aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/layout/branding.stories.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-04-20 19:24:21 +0200
committerArmand Philippot <git@armandphilippot.com>2022-04-20 19:27:29 +0200
commita08291b1586858fc894a27d56f55f87a88f8dbd3 (patch)
tree0aa36c8add0ad0ecc07c0f7f20f5af3e2f7abe46 /src/components/molecules/layout/branding.stories.tsx
parent362cf45bc520a68a1c1be20e1189ca2307577dde (diff)
refactor(storybook): reorganize design system
Add more stories for each components and change some components categories for better organization.
Diffstat (limited to 'src/components/molecules/layout/branding.stories.tsx')
-rw-r--r--src/components/molecules/layout/branding.stories.tsx46
1 files changed, 36 insertions, 10 deletions
diff --git a/src/components/molecules/layout/branding.stories.tsx b/src/components/molecules/layout/branding.stories.tsx
index 726ba26..1637c99 100644
--- a/src/components/molecules/layout/branding.stories.tsx
+++ b/src/components/molecules/layout/branding.stories.tsx
@@ -1,10 +1,13 @@
import { ComponentMeta, ComponentStory } from '@storybook/react';
import { IntlProvider } from 'react-intl';
-import BrandingComponent from './branding';
+import Branding from './branding';
+/**
+ * Branding - Storybook Meta
+ */
export default {
- title: 'Molecules/Layout',
- component: BrandingComponent,
+ title: 'Molecules/Layout/Branding',
+ component: Branding,
args: {
isHome: false,
},
@@ -53,6 +56,7 @@ export default {
required: true,
},
},
+ unoptimized: { table: { disable: true } },
withLink: {
control: {
type: 'boolean',
@@ -68,16 +72,38 @@ export default {
},
},
},
-} as ComponentMeta<typeof BrandingComponent>;
+ decorators: [
+ (Story) => (
+ <IntlProvider locale="en">
+ <Story />
+ </IntlProvider>
+ ),
+ ],
+} as ComponentMeta<typeof Branding>;
-const Template: ComponentStory<typeof BrandingComponent> = (args) => (
- <IntlProvider locale="en">
- <BrandingComponent {...args} />
- </IntlProvider>
+const Template: ComponentStory<typeof Branding> = (args) => (
+ <Branding {...args} />
);
-export const Branding = Template.bind({});
-Branding.args = {
+/**
+ * Branding Stories - Default
+ */
+export const Default = Template.bind({});
+Default.args = {
title: 'Website title',
photo: 'http://placeimg.com/640/480',
+ // @ts-ignore - Needed because of the placeholder image.
+ unoptimized: true,
+};
+
+/**
+ * Branding Stories - With baseline
+ */
+export const WithBaseline = Template.bind({});
+WithBaseline.args = {
+ title: 'Website title',
+ baseline: 'Maiores corporis qui',
+ photo: 'http://placeimg.com/640/480',
+ // @ts-ignore - Needed because of the placeholder image.
+ unoptimized: true,
};