@arcblock/ux 2.10.52 → 2.10.53
Sign up to get free protection for your applications and to get access to all the features.
@@ -16,7 +16,9 @@ const ConfirmHolder = /*#__PURE__*/forwardRef((props, ref) => {
|
|
16
16
|
showCancelButton: true,
|
17
17
|
showCloseButton: true,
|
18
18
|
confirmButtonText: 'Confirm',
|
19
|
-
|
19
|
+
confirmButtonProps: {},
|
20
|
+
cancelButtonText: 'Cancel',
|
21
|
+
cancelButtonProps: {}
|
20
22
|
});
|
21
23
|
const open = useMemoizedFn((params = {}) => {
|
22
24
|
setTitle(params.title);
|
@@ -26,7 +28,9 @@ const ConfirmHolder = /*#__PURE__*/forwardRef((props, ref) => {
|
|
26
28
|
state.showCloseButton = params.showCloseButton ?? true;
|
27
29
|
state.showCancelButton = params.showCancelButton ?? true;
|
28
30
|
if (params.confirmButtonText) state.confirmButtonText = params.confirmButtonText;
|
31
|
+
if (params.confirmButtonProps) state.confirmButtonProps = params.confirmButtonProps;
|
29
32
|
if (params.cancelButtonText) state.cancelButtonText = params.cancelButtonText;
|
33
|
+
if (params.cancelButtonProps) state.cancelButtonProps = params.cancelButtonProps;
|
30
34
|
state.loading = false;
|
31
35
|
state.show = true;
|
32
36
|
});
|
@@ -36,7 +40,9 @@ const ConfirmHolder = /*#__PURE__*/forwardRef((props, ref) => {
|
|
36
40
|
state.onConfirm = noop;
|
37
41
|
state.onCancel = noop;
|
38
42
|
state.confirmButtonText = 'Confirm';
|
43
|
+
state.confirmButtonProps = {};
|
39
44
|
state.cancelButtonText = 'Cancel';
|
45
|
+
state.cancelButtonProps = {};
|
40
46
|
});
|
41
47
|
const close = useMemoizedFn(() => {
|
42
48
|
state.show = false;
|
@@ -78,7 +84,8 @@ const ConfirmHolder = /*#__PURE__*/forwardRef((props, ref) => {
|
|
78
84
|
props: {
|
79
85
|
variant: 'contained',
|
80
86
|
color: 'primary',
|
81
|
-
loading: state.loading
|
87
|
+
loading: state.loading,
|
88
|
+
...state.confirmButtonProps
|
82
89
|
}
|
83
90
|
},
|
84
91
|
showCloseButton: state.showCloseButton,
|
@@ -87,7 +94,8 @@ const ConfirmHolder = /*#__PURE__*/forwardRef((props, ref) => {
|
|
87
94
|
text: state.cancelButtonText,
|
88
95
|
props: {
|
89
96
|
variant: 'outlined',
|
90
|
-
color: 'primary'
|
97
|
+
color: 'primary',
|
98
|
+
...state.cancelButtonProps
|
91
99
|
}
|
92
100
|
},
|
93
101
|
children: content
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arcblock/ux",
|
3
|
-
"version": "2.10.
|
3
|
+
"version": "2.10.53",
|
4
4
|
"description": "Common used react components for arcblock products",
|
5
5
|
"keywords": [
|
6
6
|
"react",
|
@@ -64,12 +64,12 @@
|
|
64
64
|
"react": ">=18.2.0",
|
65
65
|
"react-router-dom": ">=6.22.3"
|
66
66
|
},
|
67
|
-
"gitHead": "
|
67
|
+
"gitHead": "a78ffedb0502bf9605989a9494d85dcfe6d1e2d1",
|
68
68
|
"dependencies": {
|
69
69
|
"@arcblock/did-motif": "^1.1.13",
|
70
|
-
"@arcblock/icons": "^2.10.
|
71
|
-
"@arcblock/nft-display": "^2.10.
|
72
|
-
"@arcblock/react-hooks": "^2.10.
|
70
|
+
"@arcblock/icons": "^2.10.53",
|
71
|
+
"@arcblock/nft-display": "^2.10.53",
|
72
|
+
"@arcblock/react-hooks": "^2.10.53",
|
73
73
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
74
74
|
"@fontsource/inter": "^5.0.16",
|
75
75
|
"@fontsource/ubuntu-mono": "^5.0.18",
|
@@ -17,7 +17,9 @@ const ConfirmHolder = forwardRef((props, ref) => {
|
|
17
17
|
showCancelButton: true,
|
18
18
|
showCloseButton: true,
|
19
19
|
confirmButtonText: 'Confirm',
|
20
|
+
confirmButtonProps: {},
|
20
21
|
cancelButtonText: 'Cancel',
|
22
|
+
cancelButtonProps: {},
|
21
23
|
});
|
22
24
|
const open = useMemoizedFn((params = {}) => {
|
23
25
|
setTitle(params.title);
|
@@ -27,7 +29,9 @@ const ConfirmHolder = forwardRef((props, ref) => {
|
|
27
29
|
state.showCloseButton = params.showCloseButton ?? true;
|
28
30
|
state.showCancelButton = params.showCancelButton ?? true;
|
29
31
|
if (params.confirmButtonText) state.confirmButtonText = params.confirmButtonText;
|
32
|
+
if (params.confirmButtonProps) state.confirmButtonProps = params.confirmButtonProps;
|
30
33
|
if (params.cancelButtonText) state.cancelButtonText = params.cancelButtonText;
|
34
|
+
if (params.cancelButtonProps) state.cancelButtonProps = params.cancelButtonProps;
|
31
35
|
|
32
36
|
state.loading = false;
|
33
37
|
state.show = true;
|
@@ -38,7 +42,9 @@ const ConfirmHolder = forwardRef((props, ref) => {
|
|
38
42
|
state.onConfirm = noop;
|
39
43
|
state.onCancel = noop;
|
40
44
|
state.confirmButtonText = 'Confirm';
|
45
|
+
state.confirmButtonProps = {};
|
41
46
|
state.cancelButtonText = 'Cancel';
|
47
|
+
state.cancelButtonProps = {};
|
42
48
|
});
|
43
49
|
const close = useMemoizedFn(() => {
|
44
50
|
state.show = false;
|
@@ -83,6 +89,7 @@ const ConfirmHolder = forwardRef((props, ref) => {
|
|
83
89
|
variant: 'contained',
|
84
90
|
color: 'primary',
|
85
91
|
loading: state.loading,
|
92
|
+
...state.confirmButtonProps,
|
86
93
|
},
|
87
94
|
}}
|
88
95
|
showCloseButton={state.showCloseButton}
|
@@ -92,6 +99,7 @@ const ConfirmHolder = forwardRef((props, ref) => {
|
|
92
99
|
props: {
|
93
100
|
variant: 'outlined',
|
94
101
|
color: 'primary',
|
102
|
+
...state.cancelButtonProps,
|
95
103
|
},
|
96
104
|
}}>
|
97
105
|
{content}
|