From 7ec4af463c52ee140cb1e859747cf1baeb9b5b8a Mon Sep 17 00:00:00 2001 From: Vyacheslav 'SLEL' Solomin Date: Tue, 16 Jun 2020 22:34:45 +0300 Subject: [PATCH 1/3] fix(docs): zoom in behavior with modal --- storybook/tag-reset.css | 4 ++++ 1 file changed, 4 insertions(+) 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 From 6f3022ca1de3620d3404fb7efe9421135442b3f0 Mon Sep 17 00:00:00 2001 From: Vyacheslav 'SLEL' Solomin Date: Tue, 16 Jun 2020 22:47:34 +0300 Subject: [PATCH 2/3] fix(docs): add control button to modal --- src/components/Modal/Modal.stories.js | 81 +++++++++++++++++---------- 1 file changed, 51 insertions(+), 30 deletions(-) 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 }) => ( - + ) } From e8852676d8470f222b1045713e9c6be624e1eb0a Mon Sep 17 00:00:00 2001 From: Vyacheslav 'SLEL' Solomin Date: Tue, 16 Jun 2020 23:21:52 +0300 Subject: [PATCH 3/3] fix(docs): add contril button to dialog --- src/components/Dialog/Dialog.stories.js | 239 ++++++++++++++++-------- 1 file changed, 160 insertions(+), 79 deletions(-) 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', };