From a4a406463d69f6901919d273e831dff22a838caf Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Tue, 19 Apr 2022 12:07:21 +0200
Subject: chore: add a Gallery component

---
 .../organisms/images/gallery.stories.tsx           | 75 ++++++++++++++++++++++
 1 file changed, 75 insertions(+)
 create mode 100644 src/components/organisms/images/gallery.stories.tsx

(limited to 'src/components/organisms/images/gallery.stories.tsx')

diff --git a/src/components/organisms/images/gallery.stories.tsx b/src/components/organisms/images/gallery.stories.tsx
new file mode 100644
index 0000000..786cfff
--- /dev/null
+++ b/src/components/organisms/images/gallery.stories.tsx
@@ -0,0 +1,75 @@
+import ResponsiveImage from '@components/molecules/images/responsive-image';
+import { ComponentMeta, ComponentStory } from '@storybook/react';
+import Gallery from './gallery';
+
+/**
+ * Gallery - Storybook Meta
+ */
+export default {
+  title: 'Organisms/Images/Gallery',
+  component: Gallery,
+  argTypes: {
+    children: {
+      control: {
+        type: null,
+      },
+      description: 'Two or more ResponsiveImage component.',
+      type: {
+        name: 'function',
+        required: true,
+      },
+    },
+    columns: {
+      control: {
+        type: 'number',
+        min: 2,
+        max: 4,
+      },
+      description: 'The columns count.',
+      type: {
+        name: 'number',
+        required: true,
+      },
+    },
+  },
+} as ComponentMeta<typeof Gallery>;
+
+const image = {
+  alt: 'Modi provident omnis',
+  height: 480,
+  src: 'http://placeimg.com/640/480/fashion',
+  width: 640,
+};
+
+const Template: ComponentStory<typeof Gallery> = (args) => (
+  <Gallery {...args}>
+    <ResponsiveImage unoptimized {...image} />
+    <ResponsiveImage unoptimized {...image} />
+    <ResponsiveImage unoptimized {...image} />
+    <ResponsiveImage unoptimized {...image} />
+  </Gallery>
+);
+
+/**
+ * Gallery Stories - Two columns
+ */
+export const TwoColumns = Template.bind({});
+TwoColumns.args = {
+  columns: 2,
+};
+
+/**
+ * Gallery Stories - Three columns
+ */
+export const ThreeColumns = Template.bind({});
+ThreeColumns.args = {
+  columns: 3,
+};
+
+/**
+ * Gallery Stories - Four columns
+ */
+export const FourColumns = Template.bind({});
+FourColumns.args = {
+  columns: 4,
+};
-- 
cgit v1.2.3

