@onesy/ui-react 1.0.77 → 1.0.78
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/Confirm/Confirm.js +1 -1
- package/esm/Confirm/Confirm.js +3 -3
- package/esm/index.js +1 -1
- package/package.json +1 -1
package/Confirm/Confirm.js
CHANGED
@@ -128,7 +128,7 @@ const Confirm = react_1.default.forwardRef((props_, ref) => {
|
|
128
128
|
classes.root
|
129
129
|
]) }, other, otherModal, { children: (0, utils_1.is)('function', modal) ?
|
130
130
|
modal({ resolve: refs.promise.resolve.current, reject: refs.promise.reject.current }) :
|
131
|
-
((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [name !== false && ((0, jsx_runtime_1.jsx)(ModalHeader, { children: (0, jsx_runtime_1.jsx)(ModalTitle, Object.assign({ version: 't1', weight: 500 }, { children: name || l('Confirmation') })) })), (0, jsx_runtime_1.jsx)(ModalMain, { children: (0, jsx_runtime_1.jsx)(ModalText, Object.assign({ version: 'b1', weight: 200 }, { children: description !== undefined ? description : l('Are you sure you want to proceed?') })) }), (0, jsx_runtime_1.jsxs)(ModalFooter, { children: [(0, jsx_runtime_1.jsx)(Button, Object.assign({ version: 'text', color: 'inherit', tonal: true, onClick: () => close(false) }, ButtonNegativeProps, { children: ((_a = buttons === null || buttons === void 0 ? void 0 : buttons.negative) === null || _a === void 0 ? void 0 : _a.text) !== undefined ? (_b = buttons === null || buttons === void 0 ? void 0 : buttons.negative) === null || _b === void 0 ? void 0 : _b.text : l('Cancel') })), (0, jsx_runtime_1.jsx)(Button, Object.assign({ version: 'text', color: 'inherit', tonal: true, onClick: () => close(true) }, ButtonPositiveProps, { children: ((_c = buttons === null || buttons === void 0 ? void 0 : buttons.positive) === null || _c === void 0 ? void 0 : _c.text) !== undefined ? (_d = buttons === null || buttons === void 0 ? void 0 : buttons.positive) === null || _d === void 0 ? void 0 : _d.text : l('Confirm') }))] })] })) }))] })));
|
131
|
+
((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [name !== false && ((0, jsx_runtime_1.jsx)(ModalHeader, { children: (0, utils_1.is)('string', name) ? ((0, jsx_runtime_1.jsx)(ModalTitle, Object.assign({ version: 't1', weight: 500 }, { children: name || l('Confirmation') }))) : name })), (0, jsx_runtime_1.jsx)(ModalMain, { children: (0, utils_1.is)('string', description) ? ((0, jsx_runtime_1.jsx)(ModalText, Object.assign({ version: 'b1', weight: 200 }, { children: description !== undefined ? description : l('Are you sure you want to proceed?') }))) : description }), (0, jsx_runtime_1.jsxs)(ModalFooter, { children: [(0, jsx_runtime_1.jsx)(Button, Object.assign({ version: 'text', color: 'inherit', tonal: true, onClick: () => close(false) }, ButtonNegativeProps, { children: ((_a = buttons === null || buttons === void 0 ? void 0 : buttons.negative) === null || _a === void 0 ? void 0 : _a.text) !== undefined ? (_b = buttons === null || buttons === void 0 ? void 0 : buttons.negative) === null || _b === void 0 ? void 0 : _b.text : l('Cancel') })), (0, jsx_runtime_1.jsx)(Button, Object.assign({ version: 'text', color: 'inherit', tonal: true, onClick: () => close(true) }, ButtonPositiveProps, { children: ((_c = buttons === null || buttons === void 0 ? void 0 : buttons.positive) === null || _c === void 0 ? void 0 : _c.text) !== undefined ? (_d = buttons === null || buttons === void 0 ? void 0 : buttons.positive) === null || _d === void 0 ? void 0 : _d.text : l('Confirm') }))] })] })) }))] })));
|
132
132
|
});
|
133
133
|
Confirm.displayName = 'onesy-Confirm';
|
134
134
|
exports.default = Confirm;
|
package/esm/Confirm/Confirm.js
CHANGED
@@ -134,13 +134,13 @@ const Confirm = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
134
134
|
}, other, otherModal), is('function', modal) ? modal({
|
135
135
|
resolve: refs.promise.resolve.current,
|
136
136
|
reject: refs.promise.reject.current
|
137
|
-
}) : /*#__PURE__*/React.createElement(React.Fragment, null, name !== false && /*#__PURE__*/React.createElement(ModalHeader, null, /*#__PURE__*/React.createElement(ModalTitle, {
|
137
|
+
}) : /*#__PURE__*/React.createElement(React.Fragment, null, name !== false && /*#__PURE__*/React.createElement(ModalHeader, null, is('string', name) ? /*#__PURE__*/React.createElement(ModalTitle, {
|
138
138
|
version: "t1",
|
139
139
|
weight: 500
|
140
|
-
}, name || l('Confirmation'))), /*#__PURE__*/React.createElement(ModalMain, null, /*#__PURE__*/React.createElement(ModalText, {
|
140
|
+
}, name || l('Confirmation')) : name), /*#__PURE__*/React.createElement(ModalMain, null, is('string', description) ? /*#__PURE__*/React.createElement(ModalText, {
|
141
141
|
version: "b1",
|
142
142
|
weight: 200
|
143
|
-
}, description !== undefined ? description : l('Are you sure you want to proceed?'))), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, _extends({
|
143
|
+
}, description !== undefined ? description : l('Are you sure you want to proceed?')) : description), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, _extends({
|
144
144
|
version: "text",
|
145
145
|
color: "inherit",
|
146
146
|
tonal: true,
|
package/esm/index.js
CHANGED