aio-popup 6.0.3 → 6.1.0
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.
- package/index.css +1 -1
- package/index.d.ts +1 -0
- package/index.js +12 -12
- package/package.json +1 -1
package/index.css
CHANGED
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -159,7 +159,7 @@ const usePopup = (props) => {
|
|
|
159
159
|
const addHighlight = (highlight) => setHighlight(highlight);
|
|
160
160
|
const removeHighlight = () => setHighlight(undefined);
|
|
161
161
|
const addConfirm = (obj) => {
|
|
162
|
-
let { title, subtitle, submitText = 'Yes', canselText = 'No', onSubmit, onCansel = () => { }, setAttrs = () => { return {}; } } = obj;
|
|
162
|
+
let { title, subtitle, text, submitText = 'Yes', canselText = 'No', onSubmit, onCansel = () => { }, setAttrs = () => { return {}; } } = obj;
|
|
163
163
|
let config = {
|
|
164
164
|
position: 'center',
|
|
165
165
|
setAttrs: (key) => {
|
|
@@ -170,7 +170,7 @@ const usePopup = (props) => {
|
|
|
170
170
|
return attrs;
|
|
171
171
|
},
|
|
172
172
|
header: { title, subtitle },
|
|
173
|
-
body: _jsx(_Fragment, { children:
|
|
173
|
+
body: _jsx(_Fragment, { children: text }),
|
|
174
174
|
footer: (_jsxs(_Fragment, { children: [_jsx("button", { type: 'button', onClick: () => { onCansel(); removeModal(); }, children: canselText }), _jsx("button", { type: 'button', className: 'active', onClick: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
175
175
|
if (!onSubmit) {
|
|
176
176
|
return;
|
|
@@ -718,16 +718,16 @@ function getEasing(highlight) {
|
|
|
718
718
|
const { easing } = highlight;
|
|
719
719
|
var easingNames = [
|
|
720
720
|
'linear',
|
|
721
|
-
'easeInQuad',
|
|
722
|
-
'easeInSine',
|
|
723
|
-
'easeInCirc',
|
|
724
|
-
'easeInBack',
|
|
725
|
-
'easeOutQuad',
|
|
726
|
-
'easeOutSine',
|
|
727
|
-
'easeOutCirc',
|
|
728
|
-
'easeInOutQuad',
|
|
729
|
-
'easeInOutSine',
|
|
730
|
-
'easeInOutBack',
|
|
721
|
+
'easeInQuad', //1
|
|
722
|
+
'easeInSine', //5
|
|
723
|
+
'easeInCirc', //7
|
|
724
|
+
'easeInBack', //8
|
|
725
|
+
'easeOutQuad', //9
|
|
726
|
+
'easeOutSine', //13
|
|
727
|
+
'easeOutCirc', //15
|
|
728
|
+
'easeInOutQuad', //18
|
|
729
|
+
'easeInOutSine', //22
|
|
730
|
+
'easeInOutBack', //25
|
|
731
731
|
'easeOutBounce', //27
|
|
732
732
|
];
|
|
733
733
|
if (typeof easing === 'number') {
|