From 62f06c40a4eac6d11f1a93f3b49dfe6c48ce16f8 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 11 Apr 2022 19:24:04 +0200 Subject: chore: add a Meta component --- src/components/molecules/layout/meta.stories.tsx | 57 ++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 src/components/molecules/layout/meta.stories.tsx (limited to 'src/components/molecules/layout/meta.stories.tsx') diff --git a/src/components/molecules/layout/meta.stories.tsx b/src/components/molecules/layout/meta.stories.tsx new file mode 100644 index 0000000..e7a932d --- /dev/null +++ b/src/components/molecules/layout/meta.stories.tsx @@ -0,0 +1,57 @@ +import { ComponentMeta, ComponentStory } from '@storybook/react'; +import MetaComponent from './meta'; + +export default { + title: 'Molecules/Layout', + component: MetaComponent, + argTypes: { + className: { + control: { + type: 'text', + }, + description: 'Set additional classnames to the meta wrapper.', + table: { + category: 'Styles', + }, + type: { + name: 'string', + required: false, + }, + }, + meta: { + control: { + type: null, + }, + description: 'The page metadata.', + type: { + name: 'object', + required: true, + value: {}, + }, + }, + }, +} as ComponentMeta; + +const Template: ComponentStory = (args) => ( + +); + +const data = { + publication: { name: 'Published on:', value: 'April 9th 2022' }, + categories: { + name: 'Categories:', + value: [ + + Category 1 + , + + Category 2 + , + ], + }, +}; + +export const Meta = Template.bind({}); +Meta.args = { + data, +}; -- cgit v1.2.3