Improvements to SafetyNumberChangeDialog
This commit is contained in:
parent
6700f6fa15
commit
4fc1b6388c
6 changed files with 329 additions and 114 deletions
|
@ -27,6 +27,7 @@ export type OwnProps = Readonly<{
|
|||
i18n: LocalizerType;
|
||||
moduleClassName?: string;
|
||||
noMouseClose?: boolean;
|
||||
noDefaultCancelButton?: boolean;
|
||||
onCancel?: () => unknown;
|
||||
onClose: () => unknown;
|
||||
onTopOfEverything?: boolean;
|
||||
|
@ -67,6 +68,7 @@ export const ConfirmationDialog = React.memo(
|
|||
i18n,
|
||||
moduleClassName,
|
||||
noMouseClose,
|
||||
noDefaultCancelButton,
|
||||
onCancel,
|
||||
onClose,
|
||||
onTopOfEverything,
|
||||
|
@ -98,16 +100,18 @@ export const ConfirmationDialog = React.memo(
|
|||
|
||||
const footer = (
|
||||
<>
|
||||
<Button
|
||||
onClick={handleCancel}
|
||||
ref={focusRef}
|
||||
variant={
|
||||
cancelButtonVariant ||
|
||||
(hasActions ? ButtonVariant.Secondary : ButtonVariant.Primary)
|
||||
}
|
||||
>
|
||||
{cancelText || i18n('confirmation-dialog--Cancel')}
|
||||
</Button>
|
||||
{!noDefaultCancelButton ? (
|
||||
<Button
|
||||
onClick={handleCancel}
|
||||
ref={focusRef}
|
||||
variant={
|
||||
cancelButtonVariant ||
|
||||
(hasActions ? ButtonVariant.Secondary : ButtonVariant.Primary)
|
||||
}
|
||||
>
|
||||
{cancelText || i18n('confirmation-dialog--Cancel')}
|
||||
</Button>
|
||||
) : null}
|
||||
{actions.map((action, i) => (
|
||||
<Button
|
||||
key={action.text}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue