Skip to content

Commit 6f5df57

Browse files
committed
change confirmInputLabel to ReactNode
1 parent ea656c3 commit 6f5df57

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

packages/module/src/WarningModal/WarningModal.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export interface WarningModalProps extends Omit<ModalProps, 'ref'> {
2121
/** Confirmation text input props */
2222
confirmationInputProps?: TextInputProps;
2323
/** Label for the text confirmation input */
24-
confirmationInputLabel?: (deleteName?: string) => ReactNode;
24+
confirmationInputLabel?: ReactNode;
2525
/** Text the user should type to confirm selection when using confirmation input */
2626
confirmationText?: string;
2727
}
@@ -40,9 +40,7 @@ const WarningModal: React.FunctionComponent<WarningModalProps> = ({
4040
confirmButtonVariant = ButtonVariant.primary,
4141
ouiaId = 'WarningModal',
4242
confirmationInputProps,
43-
confirmationInputLabel = (deleteName) => (
44-
<>Type <strong>{deleteName} </strong> to confirm deletion:</>
45-
),
43+
confirmationInputLabel = 'Type to confirm',
4644
confirmationText,
4745
...props
4846
}: WarningModalProps) => {
@@ -98,7 +96,7 @@ const WarningModal: React.FunctionComponent<WarningModalProps> = ({
9896
{confirmationInputProps ? (
9997
<Flex direction={{ default: 'column' }} spaceItems={{ default: 'spaceItemsSm' }}>
10098
<FlexItem>
101-
{confirmationInputLabel(deleteNameSanitized)}
99+
{confirmationInputLabel}
102100
</FlexItem>
103101
<TextInput
104102
ouiaId={`${ouiaId}-confirmation-text-input`}

0 commit comments

Comments
 (0)