@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.es.js
CHANGED
|
@@ -261,20 +261,15 @@ var GhostButton = styled(StyledButton)(templateObject_3$a || (templateObject_3$a
|
|
|
261
261
|
});
|
|
262
262
|
var templateObject_1$L, templateObject_2$s, templateObject_3$a;
|
|
263
263
|
|
|
264
|
-
var Button = forwardRef(function (
|
|
265
|
-
var
|
|
266
|
-
var
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
props.onClick();
|
|
270
|
-
}
|
|
271
|
-
};
|
|
272
|
-
if (props.disabled) {
|
|
273
|
-
return (jsx(DisabledButton, __assign({}, props, { as: as, ref: ref, onClick: onClick }, { children: jsx("span", { children: props.label }) })));
|
|
264
|
+
var Button = forwardRef(function (_a, ref) {
|
|
265
|
+
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;
|
|
266
|
+
var as = href || asAnchor ? "a" : "button";
|
|
267
|
+
if (disabled) {
|
|
268
|
+
return (jsx(DisabledButton, __assign({ color: color, size: size, fluid: fluid, type: type, tabIndex: tabIndex, as: as, href: href, ref: ref }, { children: jsx("span", { children: label }) })));
|
|
274
269
|
}
|
|
275
|
-
if (
|
|
276
|
-
return (jsx(GhostButton, __assign({
|
|
277
|
-
return (jsx(StyledButton, __assign({
|
|
270
|
+
if (color === "white")
|
|
271
|
+
return (jsx(GhostButton, __assign({ color: color, size: size, fluid: fluid, type: type, tabIndex: tabIndex, as: as, href: href, ref: ref, onClick: onClick }, { children: jsx("span", { children: label }) })));
|
|
272
|
+
return (jsx(StyledButton, __assign({ color: color, size: size, fluid: fluid, type: type, tabIndex: tabIndex, as: as, href: href, ref: ref, onClick: onClick }, { children: jsx("span", { children: label }) })));
|
|
278
273
|
});
|
|
279
274
|
|
|
280
275
|
var StyledCheckbox = styled.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) {
|