fix(striker-ui): adjust combine scroll box branching in ConfirmDialog

main
Tsu-ba-me 1 year ago
parent 3431cac5dd
commit f064623dd3
  1. 10
      striker-ui/components/ConfirmDialog.tsx

@ -203,10 +203,9 @@ const ConfirmDialog = forwardRef<
),
[titleText],
);
const combinedScrollBoxSx = useMemo(() => {
let result: SxProps<Theme> | undefined;
const combinedScrollBoxSx = useMemo<SxProps<Theme> | undefined>(() => {
if (!isScrollContent) return scrollBoxSx;
if (isScrollContent) {
let overflowX: 'hidden' | undefined;
let paddingTop: string | undefined;
@ -215,7 +214,7 @@ const ConfirmDialog = forwardRef<
paddingTop = '.6em';
}
result = {
return {
maxHeight: '60vh',
overflowX,
overflowY: 'scroll',
@ -223,9 +222,6 @@ const ConfirmDialog = forwardRef<
paddingTop,
...scrollBoxSx,
};
}
return result;
}, [isFormContent, isScrollContent, scrollBoxSx]);
const contentAreaElement = useMemo(

Loading…
Cancel
Save