import React from 'react';
import { Meta, Story } from '@storybook/react';
import { MoleculePreviewFile, IPreviewFileProps } from 'react/molecules/PreviewFile';

const meta: Meta = {
  title: 'React/molecules/PreviewFile',
  component: MoleculePreviewFile,
  argTypes: {},
  parameters: {
    controls: { expanded: true },
  },
};

export default meta;

const TemplatePreviewFile: Story<IPreviewFileProps> = (props) => <MoleculePreviewFile {...props} />;

// By passing using the Args format for exported stories, you can control the props for a component for reuse in a test
// https://storybook.js.org/docs/react/workflows/unit-testing
export const PreviewFile = TemplatePreviewFile.bind({});

PreviewFile.args = {
  fileSrc: '',
  placeholder: 'Select image...',
  accept: 'image/png, image/jpeg',
  placeholderProps: {
    size: 'medium',
  },
};
