fix(striker-ui): move scroll style offsets to ConfirmDialog

main
Tsu-ba-me 2 years ago
parent fc016ea719
commit 18533ba0c8
  1. 35
      striker-ui/components/ConfirmDialog.tsx

@ -203,17 +203,30 @@ const ConfirmDialog = forwardRef<
), ),
[titleText], [titleText],
); );
const combinedScrollBoxSx = useMemo<SxProps<Theme> | undefined>( const combinedScrollBoxSx = useMemo(() => {
() => let result: SxProps<Theme> | undefined;
isScrollContent
? { if (isScrollContent) {
maxHeight: '60vh', let overflowX: 'hidden' | undefined;
overflowY: 'scroll', let paddingTop: string | undefined;
...scrollBoxSx,
} if (isFormContent) {
: undefined, overflowX = 'hidden';
[isScrollContent, scrollBoxSx], paddingTop = '.6em';
); }
result = {
maxHeight: '60vh',
overflowX,
overflowY: 'scroll',
paddingRight: '.4em',
paddingTop,
...scrollBoxSx,
};
}
return result;
}, [isFormContent, isScrollContent, scrollBoxSx]);
const contentAreaElement = useMemo( const contentAreaElement = useMemo(
() => () =>

Loading…
Cancel
Save