UNPKG

dm-web-react

Version:

The DM web client with React.

23 lines 3.94 kB
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } return cooked; }; import styled from "styled-components"; var ButtonBase = styled.button(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: ", ";\n padding: 0 12px;\n line-height: ", ";\n font-size: ", ";\n border: 1px solid transparent;\n border-radius: 4px;\n outline: none;\n cursor: pointer;\n user-select: none;\n"], ["\n height: ", ";\n padding: 0 12px;\n line-height: ", ";\n font-size: ", ";\n border: 1px solid transparent;\n border-radius: 4px;\n outline: none;\n cursor: pointer;\n user-select: none;\n"])), function (props) { return props.uiSize === "xs" ? "26px" : props.uiSize === "sm" ? "32px" : props.uiSize === "md" ? "36px" : props.uiSize === "lg" ? "48px" : "26px"; }, function (props) { return props.uiSize === "xs" ? "24px" : props.uiSize === "sm" ? "30px" : props.uiSize === "md" ? "34px" : props.uiSize === "lg" ? "46px" : "24px"; }, function (props) { return (props.uiSize === "xs" || !props.uiSize ? "12px" : "14px"); }); /** * 主要按钮 */ export var ButtonPrimary = ButtonBase.extend(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n color: ", ";\n background: ", ";\n border-color: ", ";\n :hover {\n color: ", ";\n background: ", ";\n border-color: ", ";\n }\n"], ["\n color: ", ";\n background: ", ";\n border-color: ", ";\n :hover {\n color: ", ";\n background: ", ";\n border-color: ", ";\n }\n"])), function (props) { return (props.disabled ? props.theme.button.disabled_primary_color : props.theme.button.default_primary_color); }, function (props) { return (props.disabled ? props.theme.button.disabled_primary_background : props.theme.button.default_primary_background); }, function (props) { return (props.disabled ? props.theme.button.disabled_primary_borderColor : props.theme.button.default_primary_borderColor); }, function (props) { return (props.disabled ? props.theme.button.disabled_primary_color : props.theme.button.hover_primary_color); }, function (props) { return (props.disabled ? props.theme.button.disabled_primary_background : props.theme.button.hover_primary_background); }, function (props) { return (props.disabled ? props.theme.button.disabled_primary_borderColor : props.theme.button.hover_primary_borderColor); }); /** * 次要按钮 */ export var ButtonSecondary = ButtonBase.extend(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: ", ";\n background: ", ";\n border-color: ", ";\n :hover {\n color: ", ";\n background: ", ";\n border-color: ", ";\n }\n"], ["\n color: ", ";\n background: ", ";\n border-color: ", ";\n :hover {\n color: ", ";\n background: ", ";\n border-color: ", ";\n }\n"])), function (props) { return (props.disabled ? props.theme.button.disabled_secondary_color : props.theme.button.default_secondary_color); }, function (props) { return (props.disabled ? props.theme.button.disabled_secondary_background : props.theme.button.default_secondary_background); }, function (props) { return (props.disabled ? props.theme.button.disabled_secondary_borderColor : props.theme.button.default_secondary_borderColor); }, function (props) { return (props.disabled ? props.theme.button.disabled_secondary_color : props.theme.button.hover_secondary_color); }, function (props) { return (props.disabled ? props.theme.button.disabled_secondary_background : props.theme.button.hover_secondary_background); }, function (props) { return (props.disabled ? props.theme.button.disabled_secondary_borderColor : props.theme.button.hover_secondary_borderColor); }); export var Button = ButtonPrimary; var templateObject_1, templateObject_2, templateObject_3; //# sourceMappingURL=styled.js.map