diff --git a/src/components/Dialog/Dialog.stories.js b/src/components/Dialog/Dialog.stories.js index 64134b88..72932070 100644 --- a/src/components/Dialog/Dialog.stories.js +++ b/src/components/Dialog/Dialog.stories.js @@ -8,20 +8,36 @@ export default { }; export const defaultStory = () => ( - - - - - Fagelia cancrivorous Nahor Curucaneca Echinocaris intrafissural glassful agronomics - - - - - - - + + { ({ openModal, closeModal }) => ( + + closeModal('default-dialog-id') } + id="default-dialog-id" + data-e2e-id="default-dialog" + > + { ({ onClose }) => ( + + + + + Fagelia cancrivorous Nahor Curucaneca Echinocaris intrafissural glassful agronomics + + + + + + + + ) } + + + + ) } + ); defaultStory.story = { @@ -29,20 +45,37 @@ defaultStory.story = { }; export const withStretch = () => ( - - - - - Fagelia cancrivorous Nahor Curucaneca Echinocaris intrafissural glassful agronomics - - - - - - - + + { ({ openModal, closeModal }) => ( + + closeModal('withStretch-dialog-id') } + id="withStretch-dialog-id" + data-e2e-id="default-dialog" + > + { ({ onClose }) => ( + + + + + Fagelia cancrivorous Nahor Curucaneca Echinocaris intrafissural glassful agronomics + + + + + + + + ) } + + + + ) } + ); withStretch.story = { @@ -50,20 +83,35 @@ withStretch.story = { }; export const withLargeSize = () => ( - - - - - Fagelia cancrivorous Nahor Curucaneca Echinocaris intrafissural glassful agronomics - - - - - - - + + { ({ openModal, closeModal }) => ( + + closeModal('withLargeSize-dialog-id') } + id="withLargeSize-dialog-id" + data-e2e-id="default-dialog" + > + { ({ onClose }) => ( + + + + + Fagelia cancrivorous Nahor Curucaneca Echinocaris intrafissural glassful agronomics + + + + + + + + ) } + + + + ) } + ); withLargeSize.story = { @@ -71,24 +119,40 @@ withLargeSize.story = { }; export const withScroll = () => ( - - - - - { new Array(100).fill('').map(() => ( - - Fagelia cancrivorous Nahor Curucaneca Echinocaris intrafissural glassful agronomics - - )) } - - - - - - - + + { ({ openModal, closeModal }) => ( + + closeModal('withScroll-dialog-id') } + id="withScroll-dialog-id" + data-e2e-id="default-dialog" + > + { ({ onClose }) => ( + + + + + { new Array(100).fill('').map(() => ( + + Fagelia cancrivorous Nahor Curucaneca Echinocaris intrafissural glassful agronomics + + )) } + + + + + + + + ) } + + + + ) } + ); withScroll.story = { @@ -96,27 +160,44 @@ withScroll.story = { }; export const withStretchScroll = () => ( - - - - - { new Array(100).fill('').map(() => ( - - Fagelia cancrivorous Nahor Curucaneca Echinocaris intrafissural glassful agronomics - - )) } - - - - - - - + + { ({ openModal, closeModal }) => ( + + closeModal('withStretchScroll-dialog-id') } + id="withStretchScroll-dialog-id" + data-e2e-id="default-dialog" + > + { ({ onClose }) => ( + + + + + { new Array(100).fill('').map(() => ( + + Fagelia cancrivorous Nahor Curucaneca Echinocaris intrafissural glassful agronomics + + )) } + + + + + + + + ) } + + + + ) } + ); -withScroll.story = { +withStretchScroll.story = { name: 'with stretch scroll', }; diff --git a/src/components/Modal/Modal.stories.js b/src/components/Modal/Modal.stories.js index 3a1fb309..37735854 100644 --- a/src/components/Modal/Modal.stories.js +++ b/src/components/Modal/Modal.stories.js @@ -10,32 +10,42 @@ export default { component: Modal, }; -export const defaultStory = () => ( - - +export const defaultStory = () => { + return ( + + + XXXXXXXXXX -
+
XXXXXXXXXX -
+
XXXXXXXXXX -
+
XXXXXXXXXX -
+
XXXXXXXXXX -
+
XXXXXXXXXX -
+
XXXXXXXXXX -
+
XXXXXXXXXX -
+
XXXXXXXXXX -
+
XXXXXXXXXX -
-
-
-); +
+
+
+ + + { ({ openModal }) => ( + + ) } + + + ); +}; defaultStory.story = { name: 'default', @@ -43,33 +53,39 @@ defaultStory.story = { export const withMultipleModals = () => ( - + - XXXXXXXXXX + First modal
- XXXXXXXXXX + XXXXXXXXXXXXXXXXXXXX
- XXXXXXXXXX + XXXXXXXXXXXXXXXXXXXX
- XXXXXXXXXX + XXXXXXXXXXXXXXXXXXXX
- XXXXXXXXXX + XXXXXXXXXXXXXXXXXXXX
- XXXXXXXXXX + XXXXXXXXXXXXXXXXXXXX
- XXXXXXXXXX + XXXXXXXXXXXXXXXXXXXX
- XXXXXXXXXX + XXXXXXXXXXXXXXXXXXXX
- XXXXXXXXXX + XXXXXXXXXXXXXXXXXXXX
- XXXXXXXXXX + XXXXXXXXXXXXXXXXXXXX
+ + { ({ openModal }) => ( + + ) } +
- + + - 00000 + Second modal
00000
@@ -81,6 +97,11 @@ export const withMultipleModals = () => (
+ + { ({ openModal }) => ( + + ) } +
); @@ -118,7 +139,7 @@ export const withState = () => ( { ({ openModal }) => ( - + ) } diff --git a/storybook/tag-reset.css b/storybook/tag-reset.css index e90d6008..43507efe 100644 --- a/storybook/tag-reset.css +++ b/storybook/tag-reset.css @@ -5,3 +5,7 @@ border-radius: 0; display: inline; } + +html { + height: 100%; +} \ No newline at end of file