From 00f147a7a687d5772bcc538bc606cfff972178cd Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Thu, 12 Oct 2023 17:24:13 +0200
Subject: feat(components): add a Time component

Instead of using helpers functions to format the date each time we need
to use a time element, it makes more sense to create a new component
dedicated to this task.
---
 src/components/atoms/layout/time/time.stories.tsx | 32 +++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 src/components/atoms/layout/time/time.stories.tsx

(limited to 'src/components/atoms/layout/time/time.stories.tsx')

diff --git a/src/components/atoms/layout/time/time.stories.tsx b/src/components/atoms/layout/time/time.stories.tsx
new file mode 100644
index 0000000..d534f14
--- /dev/null
+++ b/src/components/atoms/layout/time/time.stories.tsx
@@ -0,0 +1,32 @@
+import type { ComponentMeta, ComponentStory } from '@storybook/react';
+import { Time } from './time';
+
+/**
+ * Time - Storybook Meta
+ */
+export default {
+  title: 'Atoms/Layout/Time',
+  component: Time,
+  argTypes: {
+    date: {
+      control: {
+        type: 'text',
+      },
+      description: 'A valid date string.',
+      type: {
+        name: 'string',
+        required: true,
+      },
+    },
+  },
+} as ComponentMeta<typeof Time>;
+
+const Template: ComponentStory<typeof Time> = (args) => <Time {...args} />;
+
+/**
+ * Time Stories - Default
+ */
+export const Default = Template.bind({});
+Default.args = {
+  date: '2022-03-15 10:44:20',
+};
-- 
cgit v1.2.3

