Skip to content

Commit

Permalink
fix(Dialog): scrollable for no-stretch dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
zouxuoz committed Oct 29, 2019
1 parent 4f52f50 commit c578aa0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
27 changes: 26 additions & 1 deletion src/components/Dialog/Dialog.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ withLargeSize.story = {
};

export const withScroll = () => (
<Dialog size="sm" isOpen data-e2e-id="default-dialog" stretch>
<Dialog size="sm" isOpen data-e2e-id="default-dialog">
<Dialog.Header title="Mark Job as Completed" />
<Dialog.Body scrollable>
<Column>
Expand All @@ -95,6 +95,31 @@ withScroll.story = {
name: 'with scroll',
};

export const withStretchScroll = () => (
<Dialog size="sm" isOpen data-e2e-id="default-dialog" stretch>
<Dialog.Header title="Mark Job as Completed" />
<Dialog.Body scrollable>
<Column>
{ new Array(100).fill('').map(() => (
<Paragraph key="">
Fagelia cancrivorous Nahor Curucaneca Echinocaris intrafissural glassful agronomics
</Paragraph>
)) }
</Column>
</Dialog.Body>
<Dialog.Footer>
<Button color="neutral" variant="outlined">
Cancel
</Button>
<Button type="submit">Apply</Button>
</Dialog.Footer>
</Dialog>
);

withScroll.story = {
name: 'with stretch scroll',
};

export const withState = () => (
<ModalContext.Consumer>
{ ({ openModal, closeModal }) => (
Expand Down
1 change: 1 addition & 0 deletions src/components/Dialog/Dialog.theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const [DialogInnerTag, themeDialogInner] = createThemeTag('dialogInner', {
},

height: '100%',
overflow: 'auto',
},
modifiers: {
},
Expand Down

0 comments on commit c578aa0

Please sign in to comment.