UNPKG

@coko/client

Version:

Client side common code for coko apps

40 lines (39 loc) 1.92 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _styledComponents = require("styled-components"); var _toolkit = require("../../toolkit"); var _templateObject; /* stylelint-disable shorthand-property-no-redundant-values */ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var _default = { // TODO // -- input padding: breaking the grid? // -- small placeholder text? maybe by default? Input: (0, _styledComponents.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-color: ", ";\n border-style: dashed;\n border-width: 0 0 1px 0;\n color: ", ";\n height: calc(", " * 8);\n outline: 0;\n padding: 0 0 0 2px;\n transition: ", " ", ";\n\n &:focus {\n border-color: ", ";\n color: inherit;\n }\n\n &::placeholder {\n font-size: ", ";\n line-height: ", ";\n }\n "])), function (props) { switch (props.validationStatus) { case 'success': return props.theme.colorSuccess; case 'warning': return props.theme.colorWarning; case 'error': return props.theme.colorError; default: return props.theme.colorBorder; } }, function (props) { switch (props.validationStatus) { case 'success': return props.theme.colorSuccess; case 'warning': return props.theme.colorWarning; case 'error': return props.theme.colorError; default: return 'inherit'; } }, (0, _toolkit.th)('gridUnit'), (0, _toolkit.th)('transitionDuration'), (0, _toolkit.th)('transitionTimingFunction'), (0, _toolkit.th)('colorPrimary'), (0, _toolkit.th)('fontSizeBaseSmall'), (0, _toolkit.th)('lineHeightBaseSmall')) }; exports["default"] = _default;