mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
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>
This commit is contained in:
@@ -57,6 +57,10 @@
|
||||
width: 720px;
|
||||
}
|
||||
}
|
||||
|
||||
&.freeHeight {
|
||||
min-height: unset;
|
||||
}
|
||||
}
|
||||
|
||||
.loader {
|
||||
|
||||
@@ -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<CommonDialogWrapperProps, HTMLDivElement>(
|
||||
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<CommonDialogWrapperProps, HTMLDivEle
|
||||
<dialog
|
||||
className={s(
|
||||
computedStyles,
|
||||
{ dialog: true, small: size === 'small', medium: size === 'medium', large: size === 'large', fixedSize, fixedWidth },
|
||||
{ dialog: true, small: size === 'small', medium: size === 'medium', large: size === 'large', fixedSize, fixedWidth, freeHeight },
|
||||
className,
|
||||
)}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user