diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-10-09 16:31:00 +0200 | 
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-11-11 18:14:41 +0100 | 
| commit | 891441a76173c708c6604fa203b175aefa222333 (patch) | |
| tree | 27295311bb01a4e44dcc4f68422975cd705a24b8 /src/components/molecules/layout/branding.stories.tsx | |
| parent | f11a906420975e833f278a08470d8f9783c76f73 (diff) | |
refactor(components): rewrite Branding component
The component should only be responsible of the layout for the logo,
the name and the optional baseline. Also, the homepage url could
be different from `/` so the consumer should give the right url.
Diffstat (limited to 'src/components/molecules/layout/branding.stories.tsx')
| -rw-r--r-- | src/components/molecules/layout/branding.stories.tsx | 115 | 
1 files changed, 0 insertions, 115 deletions
| diff --git a/src/components/molecules/layout/branding.stories.tsx b/src/components/molecules/layout/branding.stories.tsx deleted file mode 100644 index 7ff88c9..0000000 --- a/src/components/molecules/layout/branding.stories.tsx +++ /dev/null @@ -1,115 +0,0 @@ -import type { ComponentMeta, ComponentStory } from '@storybook/react'; -import NextImage from 'next/image'; -import { Logo } from '../../atoms'; -import { Branding } from './branding'; - -/** - * Branding - Storybook Meta - */ -export default { -  title: 'Molecules/Layout/Branding', -  component: Branding, -  args: { -    isHome: false, -    withLink: false, -  }, -  argTypes: { -    baseline: { -      control: { -        type: 'text', -      }, -      description: 'The Branding baseline.', -      type: { -        name: 'string', -        required: false, -      }, -    }, -    isHome: { -      control: { -        type: 'boolean', -      }, -      description: 'Use H1 if the current page is homepage.', -      table: { -        category: 'Options', -        defaultValue: { summary: false }, -      }, -      type: { -        name: 'boolean', -        required: false, -      }, -    }, -    photo: { -      control: { -        type: 'text', -      }, -      description: 'The Branding photo.', -      type: { -        name: 'string', -        required: true, -      }, -    }, -    title: { -      control: { -        type: 'text', -      }, -      description: 'The Branding title.', -      type: { -        name: 'string', -        required: true, -      }, -    }, -    withLink: { -      control: { -        type: 'boolean', -      }, -      description: 'Wraps the title with a link to homepage.', -      table: { -        category: 'Options', -        defaultValue: { summary: false }, -      }, -      type: { -        name: 'boolean', -        required: false, -      }, -    }, -  }, -} as ComponentMeta<typeof Branding>; - -const Template: ComponentStory<typeof Branding> = (args) => ( -  <Branding {...args} /> -); - -/** - * Branding Stories - Default - */ -export const Default = Template.bind({}); -Default.args = { -  logo: <Logo heading="A logo example" />, -  photo: ( -    <NextImage -      alt="A photo example" -      height={200} -      src="https://picsum.photos/200" -      width={200} -    /> -  ), -  title: 'Website title', -}; - -/** - * Branding Stories - With baseline - */ -export const WithBaseline = Template.bind({}); -WithBaseline.args = { -  baseline: 'Maiores corporis qui', -  logo: <Logo heading="A logo example" />, -  photo: ( -    <NextImage -      alt="A photo example" -      height={200} -      src="https://picsum.photos/200" -      width={200} -    /> -  ), -  title: 'Website title', -}; | 
