UNPKG

@procraft/widget-order

Version:

Order widget for landing

70 lines (65 loc) 2.31 kB
"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.RadioGroupStyled = exports.RadioGroupRowStyled = void 0; const styled_components_1 = __importStar(require("styled-components")); const colors_1 = require("../../constants/colors"); const styles_1 = require("../../styles"); exports.RadioGroupRowStyled = styled_components_1.default.div ` /* Добавляем вложенность для жесткости стилей */ ${styles_1.WidgetOrderStyled} & { margin: 5px 0; padding: 5px 5px; display: flex; align-items: center; &, & > * { cursor: pointer; } label { margin-left: 5px; margin-bottom: 0; font-size: 12px; } input { margin: 0; padding: 0; } } /* JS-логика не работает во вложенности WidgetOrderStyled & */ ${({ checked, checkedBgColor, checkedTextColor }) => { if (checked) { return (0, styled_components_1.css) ` background-color: ${checkedBgColor !== null && checkedBgColor !== void 0 ? checkedBgColor : colors_1.TITLE_BG_DEFAULT_COLOR}; border-radius: 5px; label { color: ${checkedTextColor !== null && checkedTextColor !== void 0 ? checkedTextColor : colors_1.TITLE_TEXT_DEFAULT_COLOR}; } `; } }} `; exports.RadioGroupStyled = styled_components_1.default.div ``; //# sourceMappingURL=styles.js.map