File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
dashboard/components/PropertiesModal Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -41,16 +41,17 @@ interface StandardModalProps {
4141 maskClosable ?: boolean ;
4242 wrapProps ?: object ;
4343 contentLoading ?: boolean ;
44+ resizable ?: boolean ;
4445}
4546
4647// Standard modal widths
4748export const MODAL_STANDARD_WIDTH = 500 ;
4849export const MODAL_MEDIUM_WIDTH = 600 ;
4950export const MODAL_LARGE_WIDTH = 900 ;
5051
51- const StyledModal = styled ( Modal ) `
52+ const StyledModal = styled ( Modal ) < { $resizable ?: boolean } > `
5253 .ant-modal-body {
53- max-height: 60vh;
54+ max-height: ${ ( { $resizable } ) => ( $resizable ? 'none' : ' 60vh' ) } ;
5455 height: auto;
5556 overflow-y: auto;
5657 padding: 0;
@@ -116,6 +117,7 @@ export function StandardModal({
116117 maskClosable = false ,
117118 wrapProps,
118119 contentLoading = false ,
120+ resizable = false ,
119121} : StandardModalProps ) {
120122 const primaryButtonName = saveText || ( isEditMode ? t ( 'Save' ) : t ( 'Add' ) ) ;
121123
@@ -130,6 +132,8 @@ export function StandardModal({
130132 show = { show }
131133 width = { `${ width } px` }
132134 wrapProps = { wrapProps }
135+ $resizable = { resizable }
136+ resizable = { resizable }
133137 title = {
134138 icon ? (
135139 < ModalTitleWithIcon
Original file line number Diff line number Diff line change @@ -628,6 +628,7 @@ const PropertiesModal = ({
628628 } }
629629 title = { t ( 'Dashboard properties' ) }
630630 isEditMode
631+ resizable
631632 saveDisabled = { dashboardInfo ?. isManagedExternally || hasErrors }
632633 saveLoading = { isApplying }
633634 contentLoading = { isLoading }
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ const AdvancedSection = ({
8484 tabSize = { 2 }
8585 wordWrap
8686 width = "100%"
87- height = "200px "
87+ height = "60vh "
8888 annotations = { toEditorAnnotations ( jsonAnnotations ) }
8989 />
9090 </ ModalFormField >
You can’t perform that action at this time.
0 commit comments