UNPKG

@rapido/components

Version:

Library of common primitive components used in Rapido apps.

32 lines (31 loc) 1.25 kB
"use strict"; /** * Copyright (c) 2019-present Verum Technologies * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; result["default"] = mod; return result; }; Object.defineProperty(exports, "__esModule", { value: true }); var css_1 = __importStar(require("@styled-system/css")); exports.base = function (_a) { var __style = _a.__style, theme = _a.theme; return css_1.default(__style)(theme); }; exports.stylex = function (_a) { var stylex = _a.stylex, theme = _a.theme; return css_1.default(stylex)(theme); }; exports.variant = function (themexDefault) { if (themexDefault === void 0) { themexDefault = 'variant'; } return function (_a) { var theme = _a.theme, _b = _a.variant, variant = _b === void 0 ? 'primary' : _b, _c = _a.themex, themex = _c === void 0 ? themexDefault : _c; return css_1.default(css_1.get(theme, themex + '.' + variant, css_1.get(theme, variant)))(theme); }; };