import type { Meta, StoryObj } from '@storybook/nextjs' import FileIcon from '.' const meta = { title: 'Base/General/FileIcon', component: FileIcon, parameters: { docs: { description: { component: 'Maps a file extension to the appropriate SVG icon used across upload and attachment surfaces.', }, }, }, tags: ['autodocs'], argTypes: { type: { control: 'text', description: 'File extension or identifier used to resolve the icon.', }, className: { control: 'text', description: 'Custom classes passed to the SVG wrapper.', }, }, args: { type: 'pdf', className: 'h-10 w-10', }, } satisfies Meta export default meta type Story = StoryObj export const Default: Story = { render: args => (
Extension: {args.type}
), parameters: { docs: { source: { language: 'tsx', code: ` `.trim(), }, }, }, } export const Gallery: Story = { render: () => { const examples = ['pdf', 'docx', 'xlsx', 'csv', 'json', 'md', 'txt', 'html', 'notion', 'unknown'] return (
{examples.map(type => (
{type}
))}
) }, parameters: { docs: { source: { language: 'tsx', code: ` {['pdf','docx','xlsx','csv','json','md','txt','html','notion','unknown'].map(type => ( ))} `.trim(), }, }, }, }