import type { ComponentMeta, ComponentStory } from '@storybook/react'; import { Link } from '../../atoms'; import { MetaItem } from './meta-item'; import { MetaList } from './meta-list'; /** * MetaList - Storybook Meta */ export default { title: 'Molecules/MetaList', component: MetaList, argTypes: { items: { description: 'The meta items.', type: { name: 'object', required: true, value: {}, }, }, }, } as ComponentMeta; const Template: ComponentStory = (args) => ( ); const items = [ { id: 'comments', label: 'Comments', value: 'No comments.' }, { id: 'category', label: 'Category', value: Cat 1, }, { id: 'tags', label: 'Tags', value: [ { id: 'tag1', value: Tag 1 }, { id: 'tag2', value: Tag 2 }, ], }, { hasBorderedValues: true, hasInlinedValues: true, id: 'technologies', label: 'Technologies', value: [ { id: 'techno1', value: 'HTML' }, { id: 'techno2', value: 'CSS' }, { id: 'techno3', value: 'Javascript' }, ], }, ]; /** * MetaList Stories - Default */ export const Default = Template.bind({}); Default.args = { children: items.map(({ id, ...item }) => ), }; /** * MetaList Stories - Inlined */ export const Inlined = Template.bind({}); Inlined.args = { children: items.map(({ id, ...item }) => ), isInline: true, };