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

main
Tsu-ba-me 2 years ago
parent fc016ea719
commit 18533ba0c8
  1. 27
      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) {
let overflowX: 'hidden' | undefined;
let paddingTop: string | undefined;
if (isFormContent) {
overflowX = 'hidden';
paddingTop = '.6em';
}
result = {
maxHeight: '60vh', maxHeight: '60vh',
overflowX,
overflowY: 'scroll', overflowY: 'scroll',
paddingRight: '.4em',
paddingTop,
...scrollBoxSx, ...scrollBoxSx,
};
} }
: undefined,
[isScrollContent, scrollBoxSx], return result;
); }, [isFormContent, isScrollContent, scrollBoxSx]);
const contentAreaElement = useMemo( const contentAreaElement = useMemo(
() => () =>

Loading…
Cancel
Save