UNPKG

@up-group/react-controls

Version:

We know that there are a ton of react UI library projects to choose from. Our hope with this one is to provide the next generation of react components that you can use to bootstrap your next project, or as a reference for building a UIKit. Read on to get

30 lines 1.64 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var themedComponents_1 = require("../../../Common/theming/themedComponents"); var Styled_1 = require("../_Common/Styled"); require("react-select/dist/react-select.css"); var getWidth = function (props) { switch (props.width) { case 'auto': return ".Select { width: auto }"; case 'full': return ".Select { width: 100% }"; case 'xsmall': return ".Select { width: " + (Styled_1.sizeMap[props.width] ? Styled_1.sizeMap[props.width] : "5em") + ";"; case 'small': return ".Select { width: " + (Styled_1.sizeMap[props.width] ? Styled_1.sizeMap[props.width] : "8em") + ";"; case 'normal': return ".Select { width: " + (Styled_1.sizeMap[props.width] ? Styled_1.sizeMap[props.width] : "23em") + ";"; case 'large': return ".Select { width: " + (Styled_1.sizeMap[props.width] ? Styled_1.sizeMap[props.width] : "30em") + ";"; default: return ".Select { width: " + (Styled_1.sizeMap[props.width] ? Styled_1.sizeMap[props.width] : "100%") + ";"; } }; var getHeight = function (props) { return ".Select-input { height: 32px }\n .Select-control { height: 32px }"; }; var WrapperSelect = (_a = ["\n width:100%;\n ", "\n ", "\n"], _a.raw = ["\n width:100%;\n ", "\n ", "\n"], themedComponents_1.default.div(_a, function (props) { return getWidth(props); }, function (props) { return getHeight(props); })); exports.default = WrapperSelect; var _a; //# sourceMappingURL=styles.js.map