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

main
Tsu-ba-me 2 years ago committed by digimer
parent 4400bf6645
commit 442427cf63
  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