tabler-react-2 0.1.35 → 0.1.37
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/dist/input/dropdown.js +4 -2
- package/dist/modal/modal.js +11 -1
- package/package.json +1 -1
package/dist/input/dropdown.js
CHANGED
|
@@ -70,7 +70,7 @@ var DropdownInput = exports.DropdownInput = function DropdownInput(_ref) {
|
|
|
70
70
|
className: "dropdown"
|
|
71
71
|
}, props), /*#__PURE__*/_react["default"].createElement("a", _extends({
|
|
72
72
|
href: "#",
|
|
73
|
-
className: "btn dropdown-toggle ".concat(props.disabled ? "disabled" : ""),
|
|
73
|
+
className: "btn dropdown-toggle ".concat(props.disabled ? "disabled" : "", " ").concat(props.color ? "btn-".concat(props.outline && "outline-").concat(props.color) : ""),
|
|
74
74
|
"data-bs-toggle": "dropdown"
|
|
75
75
|
}, aprops), selectedValue ? selectedValue.label : prompt), /*#__PURE__*/_react["default"].createElement("div", {
|
|
76
76
|
className: "dropdown-menu"
|
|
@@ -106,5 +106,7 @@ DropdownInput.propTypes = {
|
|
|
106
106
|
value: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
107
107
|
id: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]).isRequired
|
|
108
108
|
}), _propTypes["default"].string, _propTypes["default"].number]),
|
|
109
|
-
onChange: _propTypes["default"].func.isRequired
|
|
109
|
+
onChange: _propTypes["default"].func.isRequired,
|
|
110
|
+
color: _propTypes["default"].string,
|
|
111
|
+
outline: _propTypes["default"].bool
|
|
110
112
|
};
|
package/dist/modal/modal.js
CHANGED
|
@@ -141,6 +141,11 @@ var useModal = exports.useModal = function useModal(options) {
|
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
143
|
};
|
|
144
|
+
var update = function update() {
|
|
145
|
+
setModalState(_objectSpread(_objectSpread({}, modalState), {}, {
|
|
146
|
+
text: options.text
|
|
147
|
+
}));
|
|
148
|
+
};
|
|
144
149
|
var ModalElement = /*#__PURE__*/_react["default"].createElement(Modal, {
|
|
145
150
|
open: modalState.open,
|
|
146
151
|
onClose: function onClose() {
|
|
@@ -160,6 +165,11 @@ var useModal = exports.useModal = function useModal(options) {
|
|
|
160
165
|
}, modalState.text);
|
|
161
166
|
return {
|
|
162
167
|
modal: modal,
|
|
163
|
-
ModalElement: ModalElement
|
|
168
|
+
ModalElement: ModalElement,
|
|
169
|
+
update: update,
|
|
170
|
+
close: function close() {
|
|
171
|
+
var v = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
172
|
+
return handleDecision(v);
|
|
173
|
+
}
|
|
164
174
|
};
|
|
165
175
|
};
|