summaryrefslogtreecommitdiffstats
path: root/src/components/molecules/modals/modal.stories.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-04-20 19:24:21 +0200
committerArmand Philippot <git@armandphilippot.com>2022-04-20 19:27:29 +0200
commita08291b1586858fc894a27d56f55f87a88f8dbd3 (patch)
tree0aa36c8add0ad0ecc07c0f7f20f5af3e2f7abe46 /src/components/molecules/modals/modal.stories.tsx
parent362cf45bc520a68a1c1be20e1189ca2307577dde (diff)
refactor(storybook): reorganize design system
Add more stories for each components and change some components categories for better organization.
Diffstat (limited to 'src/components/molecules/modals/modal.stories.tsx')
-rw-r--r--src/components/molecules/modals/modal.stories.tsx32
1 files changed, 23 insertions, 9 deletions
diff --git a/src/components/molecules/modals/modal.stories.tsx b/src/components/molecules/modals/modal.stories.tsx
index bd7d9f4..55b7677 100644
--- a/src/components/molecules/modals/modal.stories.tsx
+++ b/src/components/molecules/modals/modal.stories.tsx
@@ -1,9 +1,12 @@
import { ComponentMeta, ComponentStory } from '@storybook/react';
-import ModalComponent from './modal';
+import Modal from './modal';
+/**
+ * Widget - Storybook Meta
+ */
export default {
- title: 'Molecules/Modals',
- component: ModalComponent,
+ title: 'Molecules/Modals/Modal',
+ component: Modal,
argTypes: {
children: {
control: {
@@ -56,14 +59,25 @@ export default {
},
},
},
-} as ComponentMeta<typeof ModalComponent>;
+} as ComponentMeta<typeof Modal>;
-const Template: ComponentStory<typeof ModalComponent> = (args) => (
- <ModalComponent {...args} />
-);
+const Template: ComponentStory<typeof Modal> = (args) => <Modal {...args} />;
-export const Modal = Template.bind({});
-Modal.args = {
+/**
+ * Modal Stories - Default
+ */
+export const Default = Template.bind({});
+Default.args = {
children:
'Inventore natus dignissimos aut illum modi asperiores. Et voluptatibus delectus.',
};
+
+/**
+ * Modal Stories - With title
+ */
+export const WithTitle = Template.bind({});
+WithTitle.args = {
+ children:
+ 'Inventore natus dignissimos aut illum modi asperiores. Et voluptatibus delectus.',
+ title: 'Alias praesentium corporis',
+};