UNPKG

@arche-mc2/arche-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

55 lines 2 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var classnames = require("classnames"); var styles_1 = require("../_Common/Styled/Input/styles"); var typestyle_1 = require("typestyle"); var csx_1 = require("csx"); var utils_1 = require("../../../Common/theming/utils"); var sizeMap = { xsmall: "100px", small: "150px", medium: "350px", large: "450px", xlarge: "600px", xxlarge: "700px", fill: "100%", }; var base = function (props) { return ({ $nest: { "&.up-text": { minHeight: '80px', width: sizeMap[props.width] || "500px", padding: utils_1.toRem(10), border: "1px solid " + props.theme.colorMap.darkGray4, borderRadius: props.theme.borderRadius }, "&.up-text::placeholder": { color: props.theme.colorMap.grey1, fontStyle: 'italic', fontSize: utils_1.toRem(14), fontWeight: 500 }, "&.up-text-max-characters": { color: props.theme.colorMap.grey1, border: 'none', display: 'flex', justifyContent: 'flex-end', alignItems: 'baseline' }, "&.up-text-max-characters-msg": { color: props.theme.colorMap.grey1, fontWeight: 500, paddingRight: '5px', border: 'none' }, "&.up-text-error": { borderColor: props.theme.colorMap.error, backgroundColor: csx_1.color(props.theme.colorMap.error).lighten(0.55).toHexString() } } }); }; var error = function (props) { return ({ border: "1px solid " + props.theme.colorMap.danger, }); }; exports.getStyles = function (props) { return (classnames(typestyle_1.style(styles_1.defaultStyles(props)), typestyle_1.style(base(props)), props.hasError ? typestyle_1.style(error(props)) : null)); }; //# sourceMappingURL=styles.js.map