import type { Meta, StoryObj } from '@storybook/react'; import { action } from 'storybook/actions'; import React from 'react'; import styles from './UploadStories.module.css'; import { Upload } from '../Upload'; import { SnapshotContainer } from '../../../test-utils/SnapshotsContainer'; const meta: Meta = { title: 'Form/Upload (Dropzone)', component: Upload, args: { content: ( Drag & drop file(s) here
or{' '} import them from your computer
), activeDragContent: 'Upload file(s)', onUpload: (e) => action('upload')(e), }, }; export default meta; type Story = StoryObj; export const Default: Story = { render: (args) => (
), }; export const Invalid: Story = { args: { isInvalid: true, }, render: Default.render, }; export const InADisabledFieldset: Story = { render: (args) => (
), }; export const Illustration: Story = { args: { illustration: , }, render: Default.render, }; export const AcceptSpecificFileTypes: Story = { args: { accept: 'image/*', }, render: Default.render, }; export const ExpandedHeight: Story = { render: (args) => (
), }; export const Snapshot: Story = { parameters: { chromatic: { disableSnapshot: false }, }, render: () => ( ), };