fix(striker-ui): add arbitrary slot before action area in ConfirmDialog

main
Tsu-ba-me 2 years ago
parent 3b9e3c6af0
commit 4b14d2d568
  1. 2
      striker-ui/components/ConfirmDialog.tsx
  2. 1
      striker-ui/types/ConfirmDialog.d.ts

@ -49,6 +49,7 @@ const ConfirmDialog = forwardRef<
onProceedAppend, onProceedAppend,
onSubmitAppend, onSubmitAppend,
openInitially = false, openInitially = false,
preActionArea,
proceedButtonProps = {}, proceedButtonProps = {},
proceedColour: proceedColourKey = 'blue', proceedColour: proceedColourKey = 'blue',
scrollContent: isScrollContent = false, scrollContent: isScrollContent = false,
@ -234,6 +235,7 @@ const ConfirmDialog = forwardRef<
<Box {...restScrollBoxProps} sx={combinedScrollBoxSx}> <Box {...restScrollBoxProps} sx={combinedScrollBoxSx}>
{contentElement} {contentElement}
</Box> </Box>
{preActionArea}
{actionAreaElement} {actionAreaElement}
</FlexBox> </FlexBox>
</MUIDialog> </MUIDialog>

@ -10,6 +10,7 @@ type ConfirmDialogOptionalProps = {
onCancelAppend?: ContainedButtonProps['onClick']; onCancelAppend?: ContainedButtonProps['onClick'];
onSubmitAppend?: import('react').FormEventHandler<HTMLDivElement>; onSubmitAppend?: import('react').FormEventHandler<HTMLDivElement>;
openInitially?: boolean; openInitially?: boolean;
preActionArea?: import('react').ReactNode;
proceedButtonProps?: ContainedButtonProps; proceedButtonProps?: ContainedButtonProps;
proceedColour?: 'blue' | 'red'; proceedColour?: 'blue' | 'red';
scrollContent?: boolean; scrollContent?: boolean;

Loading…
Cancel
Save