Skip to content

Commit 6e42d1e

Browse files
committed
fix(ui-modal): fill the available space if fullscreen prop is set
1 parent 3813636 commit 6e42d1e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/ui-modal/src/Modal/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,9 @@ class Modal extends Component<ModalProps, ModalState> {
176176
// this is needed to apply a media query breakpoint
177177
const wrappedHeaderAndBody =
178178
headerAndBody.length > 0 ? (
179-
<div css={styles?.joinedHeaderAndBody}>{headerAndBody}</div>
179+
<div key="header-and-body" css={styles?.joinedHeaderAndBody}>
180+
{headerAndBody}
181+
</div>
180182
) : null
181183

182184
return [...(wrappedHeaderAndBody ? [wrappedHeaderAndBody] : []), ...others]

packages/ui-modal/src/Modal/styles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ const generateStyle = (
114114
display: 'flex',
115115
flexDirection: 'column',
116116
overflow: 'hidden',
117-
117+
flex: '1 1 auto',
118118
// ModalHeader and ModalBody is set to scrollable above 20rem height instead of just the ModalBody
119119
'@media (max-height: 20rem)': {
120120
overflowY: 'auto',

0 commit comments

Comments
 (0)