From 891441a76173c708c6604fa203b175aefa222333 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Mon, 9 Oct 2023 16:31:00 +0200
Subject: 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.
---
 .../molecules/branding/branding.stories.tsx        | 92 ++++++++++++++++++++++
 1 file changed, 92 insertions(+)
 create mode 100644 src/components/molecules/branding/branding.stories.tsx

(limited to 'src/components/molecules/branding/branding.stories.tsx')

diff --git a/src/components/molecules/branding/branding.stories.tsx b/src/components/molecules/branding/branding.stories.tsx
new file mode 100644
index 0000000..c2f216a
--- /dev/null
+++ b/src/components/molecules/branding/branding.stories.tsx
@@ -0,0 +1,92 @@
+import type { ComponentMeta, ComponentStory } from '@storybook/react';
+import NextImage from 'next/image';
+import { Heading } from '../../atoms';
+import { Branding } from './branding';
+
+/**
+ * Branding - Storybook Meta
+ */
+export default {
+  title: 'Molecules/Branding',
+  component: Branding,
+  args: {},
+  argTypes: {
+    baseline: {
+      control: {
+        type: 'object',
+      },
+      description: 'The brand baseline.',
+      type: {
+        name: 'function',
+        required: false,
+      },
+    },
+    logo: {
+      control: {
+        type: 'object',
+      },
+      description: 'The brand logo.',
+      type: {
+        name: 'function',
+        required: true,
+      },
+    },
+    name: {
+      control: {
+        type: 'object',
+      },
+      description: 'The brand name.',
+      type: {
+        name: 'function',
+        required: true,
+      },
+    },
+    url: {
+      control: {
+        type: 'string',
+      },
+      description: 'The homepage url.',
+      type: {
+        name: 'string',
+        required: false,
+      },
+    },
+  },
+} as ComponentMeta<typeof Branding>;
+
+const Template: ComponentStory<typeof Branding> = (args) => (
+  <Branding {...args} />
+);
+
+/**
+ * Branding Stories - Logo and title
+ */
+export const LogoAndTitle = Template.bind({});
+LogoAndTitle.args = {
+  logo: (
+    <NextImage
+      alt="Your brand logo"
+      height={150}
+      src="https://picsum.photos/150"
+      width={150}
+    />
+  ),
+  name: <Heading level={1}>Your brand name</Heading>,
+};
+
+/**
+ * Branding Stories - Logo, title and baseline
+ */
+export const LogoTitleAndBaseline = Template.bind({});
+LogoTitleAndBaseline.args = {
+  baseline: <div>Your brand baseline if any</div>,
+  logo: (
+    <NextImage
+      alt="Your brand logo"
+      height={150}
+      src="https://picsum.photos/150"
+      width={150}
+    />
+  ),
+  name: <Heading level={1}>Your brand name</Heading>,
+};
-- 
cgit v1.2.3

