Skip to content

Commit 2aa4766

Browse files
committed
add styles to modal content to spread through the whole content container
1 parent 43c0c9a commit 2aa4766

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import styled from 'styled-components'
2+
import { Modal } from 'uiSrc/components/base/display/modal'
3+
4+
export const StyledFormDialogContent = styled(Modal.Content.Compose)`
5+
width: 900px !important;
6+
height: 700px !important;
7+
8+
max-width: calc(100vw - 120px) !important;
9+
max-height: calc(100vh - 120px) !important;
10+
11+
// Flex the modal content to fill the whole available space
12+
> [data-role='dialog-hub'] {
13+
flex: 1;
14+
}
15+
`

redisinsight/ui/src/components/form-dialog/FormDialog.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import React from 'react'
2-
import cx from 'classnames'
32

43
import { Nullable } from 'uiSrc/utils'
54
import { CancelIcon } from 'uiSrc/components/base/icons'
65
import { Modal } from 'uiSrc/components/base/display'
7-
import styles from './styles.module.scss'
6+
7+
import { StyledFormDialogContent } from './FormDialog.styles'
88

99
export interface Props {
1010
isOpen: boolean
@@ -22,16 +22,16 @@ const FormDialog = (props: Props) => {
2222

2323
return (
2424
<Modal.Compose open={isOpen}>
25-
<Modal.Content.Compose
25+
<StyledFormDialogContent
2626
persistent
27-
className={cx(styles.modal, className)}
27+
className={className}
2828
onCancel={onClose}
2929
>
3030
<Modal.Content.Close icon={CancelIcon} onClick={onClose} />
3131
<Modal.Content.Header.Title>{header}</Modal.Content.Header.Title>
3232
<Modal.Content.Body content={children} />
3333
<Modal.Content.Footer.Compose>{footer}</Modal.Content.Footer.Compose>
34-
</Modal.Content.Compose>
34+
</StyledFormDialogContent>
3535
</Modal.Compose>
3636
)
3737
}

redisinsight/ui/src/components/form-dialog/styles.module.scss

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)