From d75b9a1e150ab211c1052fb49bede9bd16320aca Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Sat, 7 Oct 2023 18:44:14 +0200
Subject: feat(components): add a generic Flip component

The flipping animation is used at several places so it makes sense to
use a single component to handle the animation. It will avoid styles
duplication.
---
 src/components/atoms/flip/flip.stories.tsx | 61 ++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)
 create mode 100644 src/components/atoms/flip/flip.stories.tsx

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

diff --git a/src/components/atoms/flip/flip.stories.tsx b/src/components/atoms/flip/flip.stories.tsx
new file mode 100644
index 0000000..1e470b1
--- /dev/null
+++ b/src/components/atoms/flip/flip.stories.tsx
@@ -0,0 +1,61 @@
+import type { ComponentMeta, ComponentStory } from '@storybook/react';
+import { Flip as FlipComponent } from './flip';
+import { FlipSide } from './flip-side';
+
+/**
+ * Flip - Storybook Meta
+ */
+export default {
+  title: 'Atoms/Flip',
+  component: FlipComponent,
+  argTypes: {},
+} as ComponentMeta<typeof FlipComponent>;
+
+const Template: ComponentStory<typeof FlipComponent> = (args) => (
+  <FlipComponent {...args} tabIndex={0} />
+);
+
+/**
+ * Images Stories - Horizontal Flipping
+ */
+export const Horizontal = Template.bind({});
+Horizontal.args = {
+  children: (
+    <>
+      <FlipSide style={{ padding: '10px' }}>
+        Consequatur natus possimus quia consequatur placeat consectetur. Quia
+        vel magnam. Dolorem in quas non inventore aut sapiente. Consequuntur est
+        cum et.
+      </FlipSide>
+      <FlipSide isBack style={{ background: '#eee', padding: '10px' }}>
+        Iusto voluptatem repudiandae odit quo amet. Dolores vitae et neque
+        minima velit. Ad consequatur assumenda qui placeat aut consectetur
+        officia numquam illo. Neque quos voluptate ipsam eum ipsa officiis et
+        autem non.
+      </FlipSide>
+    </>
+  ),
+};
+
+/**
+ * Images Stories - Vertical Flipping
+ */
+export const Vertical = Template.bind({});
+Vertical.args = {
+  children: (
+    <>
+      <FlipSide style={{ padding: '10px' }}>
+        Consequatur natus possimus quia consequatur placeat consectetur. Quia
+        vel magnam. Dolorem in quas non inventore aut sapiente. Consequuntur est
+        cum et.
+      </FlipSide>
+      <FlipSide isBack style={{ background: '#eee', padding: '10px' }}>
+        Iusto voluptatem repudiandae odit quo amet. Dolores vitae et neque
+        minima velit. Ad consequatur assumenda qui placeat aut consectetur
+        officia numquam illo. Neque quos voluptate ipsam eum ipsa officiis et
+        autem non.
+      </FlipSide>
+    </>
+  ),
+  direction: 'vertical',
+};
-- 
cgit v1.2.3

