@typeolymp/ui-components 1.9.2 → 1.9.3

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 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 (props, ref) {
265
- var as = props.href || props.asAnchor ? "a" : "button";
266
- var onClick = function () {
267
- if (!props.disabled) {
268
- if (props.onClick)
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, ref: ref }, { children: jsx("span", { children: label }) })));
274
269
  }
275
- if (props.color === "white")
276
- return (jsx(GhostButton, __assign({}, props, { as: as, ref: ref, onClick: onClick }, { children: jsx("span", { children: props.label }) })));
277
- return (jsx(StyledButton, __assign({}, props, { as: as, ref: ref, onClick: onClick }, { children: jsx("span", { children: props.label }) })));
270
+ if (color === "white")
271
+ return (jsx(GhostButton, __assign({ color: color, size: size, fluid: fluid, type: type, tabIndex: tabIndex, as: as, 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, 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) {