@automattic/vip-design-system 2.12.3 → 2.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function NewConfirmationDialog({ trigger, onConfirm, needsConfirm, label, buttonVariant, title, body, ...props }: {
|
|
1
|
+
export function NewConfirmationDialog({ trigger, onConfirm, needsConfirm, label, buttonVariant, title, body, buttonDisabled, ...props }: {
|
|
2
2
|
[x: string]: any;
|
|
3
3
|
trigger: any;
|
|
4
4
|
onConfirm: any;
|
|
@@ -7,6 +7,7 @@ export function NewConfirmationDialog({ trigger, onConfirm, needsConfirm, label,
|
|
|
7
7
|
buttonVariant: any;
|
|
8
8
|
title: any;
|
|
9
9
|
body?: string | undefined;
|
|
10
|
+
buttonDisabled?: boolean | undefined;
|
|
10
11
|
}): React.JSX.Element;
|
|
11
12
|
export namespace NewConfirmationDialog {
|
|
12
13
|
namespace propTypes {
|
|
@@ -17,6 +18,7 @@ export namespace NewConfirmationDialog {
|
|
|
17
18
|
let body: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
18
19
|
let label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
19
20
|
let buttonVariant: PropTypes.Requireable<string>;
|
|
21
|
+
let buttonDisabled: PropTypes.Requireable<boolean>;
|
|
20
22
|
}
|
|
21
23
|
}
|
|
22
24
|
import React from 'react';
|
|
@@ -59,6 +59,7 @@ const NewConfirmationDialog = ( {
|
|
|
59
59
|
buttonVariant,
|
|
60
60
|
title,
|
|
61
61
|
body = '',
|
|
62
|
+
buttonDisabled = false,
|
|
62
63
|
...props
|
|
63
64
|
} ) => {
|
|
64
65
|
const directTrigger = React.cloneElement( trigger, { onClick: onConfirm } );
|
|
@@ -79,6 +80,7 @@ const NewConfirmationDialog = ( {
|
|
|
79
80
|
body={ body }
|
|
80
81
|
label={ label }
|
|
81
82
|
buttonVariant={ buttonVariant }
|
|
83
|
+
buttonDisabled={ buttonDisabled }
|
|
82
84
|
/>
|
|
83
85
|
) }
|
|
84
86
|
trigger={ trigger }
|
|
@@ -95,6 +97,7 @@ NewConfirmationDialog.propTypes = {
|
|
|
95
97
|
body: PropTypes.node,
|
|
96
98
|
label: PropTypes.node,
|
|
97
99
|
buttonVariant: PropTypes.string,
|
|
100
|
+
buttonDisabled: PropTypes.bool,
|
|
98
101
|
};
|
|
99
102
|
|
|
100
103
|
export { NewConfirmationDialog };
|
package/package.json
CHANGED
|
@@ -59,6 +59,7 @@ const NewConfirmationDialog = ( {
|
|
|
59
59
|
buttonVariant,
|
|
60
60
|
title,
|
|
61
61
|
body = '',
|
|
62
|
+
buttonDisabled = false,
|
|
62
63
|
...props
|
|
63
64
|
} ) => {
|
|
64
65
|
const directTrigger = React.cloneElement( trigger, { onClick: onConfirm } );
|
|
@@ -79,6 +80,7 @@ const NewConfirmationDialog = ( {
|
|
|
79
80
|
body={ body }
|
|
80
81
|
label={ label }
|
|
81
82
|
buttonVariant={ buttonVariant }
|
|
83
|
+
buttonDisabled={ buttonDisabled }
|
|
82
84
|
/>
|
|
83
85
|
) }
|
|
84
86
|
trigger={ trigger }
|
|
@@ -95,6 +97,7 @@ NewConfirmationDialog.propTypes = {
|
|
|
95
97
|
body: PropTypes.node,
|
|
96
98
|
label: PropTypes.node,
|
|
97
99
|
buttonVariant: PropTypes.string,
|
|
100
|
+
buttonDisabled: PropTypes.bool,
|
|
98
101
|
};
|
|
99
102
|
|
|
100
103
|
export { NewConfirmationDialog };
|