@typeolymp/ui-components 1.9.2 → 1.9.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.
- package/build/index.es.js +8 -13
- package/build/index.es.js.map +1 -1
- package/build/index.js +8 -13
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -272,20 +272,15 @@ var GhostButton = styled__default["default"](StyledButton)(templateObject_3$a ||
|
|
|
272
272
|
});
|
|
273
273
|
var templateObject_1$L, templateObject_2$s, templateObject_3$a;
|
|
274
274
|
|
|
275
|
-
var Button = React.forwardRef(function (
|
|
276
|
-
var
|
|
277
|
-
var
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
props.onClick();
|
|
281
|
-
}
|
|
282
|
-
};
|
|
283
|
-
if (props.disabled) {
|
|
284
|
-
return (jsxRuntime.jsx(DisabledButton, __assign({}, props, { as: as, ref: ref, onClick: onClick }, { children: jsxRuntime.jsx("span", { children: props.label }) })));
|
|
275
|
+
var Button = React.forwardRef(function (_a, ref) {
|
|
276
|
+
var label = _a.label, color = _a.color, size = _a.size, fluid = _a.fluid, disabled = _a.disabled, type = _a.type, tabIndex = _a.tabIndex, href = _a.href, asAnchor = _a.asAnchor, onClick = _a.onClick;
|
|
277
|
+
var as = href || asAnchor ? "a" : "button";
|
|
278
|
+
if (disabled) {
|
|
279
|
+
return (jsxRuntime.jsx(DisabledButton, __assign({ color: color, size: size, fluid: fluid, type: type, tabIndex: tabIndex, as: as, href: href, ref: ref }, { children: jsxRuntime.jsx("span", { children: label }) })));
|
|
285
280
|
}
|
|
286
|
-
if (
|
|
287
|
-
return (jsxRuntime.jsx(GhostButton, __assign({
|
|
288
|
-
return (jsxRuntime.jsx(StyledButton, __assign({
|
|
281
|
+
if (color === "white")
|
|
282
|
+
return (jsxRuntime.jsx(GhostButton, __assign({ color: color, size: size, fluid: fluid, type: type, tabIndex: tabIndex, as: as, href: href, ref: ref, onClick: onClick }, { children: jsxRuntime.jsx("span", { children: label }) })));
|
|
283
|
+
return (jsxRuntime.jsx(StyledButton, __assign({ color: color, size: size, fluid: fluid, type: type, tabIndex: tabIndex, as: as, href: href, ref: ref, onClick: onClick }, { children: jsxRuntime.jsx("span", { children: label }) })));
|
|
289
284
|
});
|
|
290
285
|
|
|
291
286
|
var StyledCheckbox = styled__default["default"].div(templateObject_1$K || (templateObject_1$K = __makeTemplateObject(["\n min-height: 25px;\n max-height: 25px;\n min-width: 25px;\n max-width: 25px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n cursor: ", ";\n background-color: ", ";\n\n svg {\n margin-left: -1px;\n fill: ", ";\n }\n\n input {\n display: none;\n }\n\n :focus {\n outline: 0;\n border-color: ", ";\n box-shadow: ", ";\n }\n"], ["\n min-height: 25px;\n max-height: 25px;\n min-width: 25px;\n max-width: 25px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n cursor: ", ";\n background-color: ", ";\n\n svg {\n margin-left: -1px;\n fill: ", ";\n }\n\n input {\n display: none;\n }\n\n :focus {\n outline: 0;\n border-color: ", ";\n box-shadow: ", ";\n }\n"])), function (_a) {
|