summaryrefslogtreecommitdiffstats
path: root/src/components/molecules/layout/meta.stories.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-04-11 19:24:04 +0200
committerArmand Philippot <git@armandphilippot.com>2022-04-11 19:24:04 +0200
commit62f06c40a4eac6d11f1a93f3b49dfe6c48ce16f8 (patch)
tree1423b5ec09cd164ea41a9b566b7b97872e83702d /src/components/molecules/layout/meta.stories.tsx
parenta7adae1a2376082841053c91508b1c23dc951b74 (diff)
chore: add a Meta component
Diffstat (limited to 'src/components/molecules/layout/meta.stories.tsx')
-rw-r--r--src/components/molecules/layout/meta.stories.tsx57
1 files changed, 57 insertions, 0 deletions
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<typeof MetaComponent>;
+
+const Template: ComponentStory<typeof MetaComponent> = (args) => (
+ <MetaComponent {...args} />
+);
+
+const data = {
+ publication: { name: 'Published on:', value: 'April 9th 2022' },
+ categories: {
+ name: 'Categories:',
+ value: [
+ <a key="category1" href="#">
+ Category 1
+ </a>,
+ <a key="category2" href="#">
+ Category 2
+ </a>,
+ ],
+ },
+};
+
+export const Meta = Template.bind({});
+Meta.args = {
+ data,
+};