Skip to content

Commit

Permalink
fix(dialog): fix dialog scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
ej9x committed Jun 13, 2019
1 parent 5464d5b commit a944785
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions e2e/__tests__/dialog.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ const SUITES = [
.setRoot(async (iframe) => {
return await iframe.waitForXPath('//*[@data-e2e-id="default-dialog"]');
}),
baisy.suite('Components/Dialog', 'with scroll')
.setRoot(async (iframe) => {
return await iframe.waitForXPath('//*[@data-e2e-id="default-dialog"]');
}),
];


Expand Down
16 changes: 15 additions & 1 deletion src/components/Dialog/Dialog.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,24 @@ export default (asStory) => {
</Dialog.Footer>
</Dialog>
))
.add('with large size', () => (
<Dialog size="xl" isOpen data-e2e-id="default-dialog">
<Dialog.Header title="Mark Job as Completed" />
<Dialog.Body>
<Paragraph>
Fagelia cancrivorous Nahor Curucaneca Echinocaris intrafissural glassful agronomics
</Paragraph>
</Dialog.Body>
<Dialog.Footer>
<Button color="neutral" variant="outlined">Cancel</Button>
<Button type="submit">Apply</Button>
</Dialog.Footer>
</Dialog>
))
.add('with scroll', () => (
<Dialog size="sm" isOpen data-e2e-id="default-dialog">
<Dialog.Header title="Mark Job as Completed" />
<Dialog.Body>
<Dialog.Body scrollable>
<Column>
{ (new Array(100)).fill('').map(() => (
<Paragraph key="">
Expand Down
4 changes: 4 additions & 0 deletions src/components/Dialog/Dialog.theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const [DialogBodyTag, themeBody] = createThemeTag('dialogBody', {
display: 'flex',
flexDirection: 'column',
flexShrink: 1,
maxHeight: '100%',
},
});

Expand Down Expand Up @@ -52,6 +53,9 @@ const [DialogTag, themeDialog] = createThemeTag('dialog', {
xl: {
width: '800px',
},
xxl: {
width: '1000px',
},
},
},
});
Expand Down

0 comments on commit a944785

Please sign in to comment.