File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
src/Shared/Components/ConfirmationModal Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,9 @@ const ConfirmationModalBody = ({
30
30
31
31
const RenderIcon = Icon ?? getIconFromVariant ( variant )
32
32
33
- const disablePrimaryButton : boolean = confirmationKeyword && confirmationText . trim ( ) !== confirmationKeyword
33
+ const disablePrimaryButton : boolean =
34
+ ( 'disabled' in primaryButtonConfig && primaryButtonConfig . disabled ) ||
35
+ ( confirmationKeyword && confirmationText . trim ( ) !== confirmationKeyword )
34
36
35
37
const handleTriggerPrimaryActionButton = ( ) => {
36
38
if ( primaryButtonConfig && ! disablePrimaryButton ) {
@@ -120,10 +122,7 @@ const ConfirmationModalBody = ({
120
122
? primaryButtonConfig . style
121
123
: getPrimaryButtonStyleFromVariant ( variant )
122
124
}
123
- disabled = {
124
- ( 'disabled' in primaryButtonConfig && primaryButtonConfig . disabled ) ||
125
- disablePrimaryButton
126
- }
125
+ disabled = { disablePrimaryButton }
127
126
isLoading = { primaryButtonConfig . isLoading }
128
127
text = { primaryButtonConfig . text }
129
128
onClick = { primaryButtonConfig . onClick as ButtonHTMLAttributes < HTMLButtonElement > [ 'onClick' ] }
You can’t perform that action at this time.
0 commit comments