From df9de51bda87a4ff02e70673d82d47ec40b1034a Mon Sep 17 00:00:00 2001 From: alex <48489896+devnaumov@users.noreply.github.com> Date: Wed, 25 Oct 2023 12:34:59 +0200 Subject: [PATCH] CB-4128 review fixes (#2082) * CB-4128 review fixes * CB-4128 declare styles once --------- Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com> --- .../CommonDialog/CommonDialog/CommonDialogWrapper.m.css | 4 ++++ .../src/CommonDialog/CommonDialog/CommonDialogWrapper.tsx | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogWrapper.m.css b/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogWrapper.m.css index 9cfc79c109..de8c1dcc8b 100644 --- a/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogWrapper.m.css +++ b/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogWrapper.m.css @@ -57,6 +57,10 @@ width: 720px; } } + + &.freeHeight { + min-height: unset; + } } .loader { diff --git a/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogWrapper.tsx b/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogWrapper.tsx index 0417046710..3b24f96e03 100644 --- a/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogWrapper.tsx +++ b/webapp/packages/core-blocks/src/CommonDialog/CommonDialog/CommonDialogWrapper.tsx @@ -22,13 +22,17 @@ export interface CommonDialogWrapperProps { 'aria-label'?: string; fixedSize?: boolean; fixedWidth?: boolean; + freeHeight?: boolean; className?: string; children?: React.ReactNode; style?: ComponentStyle; } export const CommonDialogWrapper = observer( - forwardRef(function CommonDialogWrapper({ size = 'medium', fixedSize, fixedWidth, 'aria-label': ariaLabel, className, children, style }, ref) { + forwardRef(function CommonDialogWrapper( + { size = 'medium', fixedSize, fixedWidth, freeHeight, 'aria-label': ariaLabel, className, children, style }, + ref, + ) { const computedStyles = useS(styles, style); const context = useContext(DialogContext); const dialogState = useDialogState({ visible: true }); @@ -52,7 +56,7 @@ export const CommonDialogWrapper = observer