parent
2079c6e722
commit
15674d41ee
1 changed files with 34 additions and 0 deletions
@ -0,0 +1,34 @@ |
||||
import { forwardRef, useMemo } from 'react'; |
||||
|
||||
import ConfirmDialog from './ConfirmDialog'; |
||||
|
||||
const FormDialog = forwardRef< |
||||
ConfirmDialogForwardedRefContent, |
||||
ConfirmDialogProps |
||||
>((props, ref) => { |
||||
const { scrollContent: isScrollContent } = props; |
||||
|
||||
const scrollBoxPaddingRight = useMemo( |
||||
() => (isScrollContent ? '.5em' : undefined), |
||||
[isScrollContent], |
||||
); |
||||
|
||||
return ( |
||||
<ConfirmDialog |
||||
dialogProps={{ |
||||
PaperProps: { sx: { minWidth: { xs: '90%', md: '50em' } } }, |
||||
}} |
||||
formContent |
||||
scrollBoxProps={{ |
||||
paddingRight: scrollBoxPaddingRight, |
||||
paddingTop: '.3em', |
||||
}} |
||||
{...props} |
||||
ref={ref} |
||||
/> |
||||
); |
||||
}); |
||||
|
||||
FormDialog.displayName = 'FormDialog'; |
||||
|
||||
export default FormDialog; |
Loading…
Reference in new issue