@smart-react-components/ui
Version:
SRC UI includes React and Styled components.
30 lines (27 loc) • 1.05 kB
JavaScript
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const Div_1 = __importDefault(require("@smart-react-components/core/Element/Div"));
const styled_components_1 = __importDefault(require("styled-components"));
exports.default = (0, styled_components_1.default)(Div_1.default).attrs({
getColorPickerSize: (v, t) => `
padding: ${t.$.size.colorPicker[v].space};
width: ${t.$.size.colorPicker[v].width};
> *:not(:first-child) {
margin-top: ${t.$.size.colorPicker[v].space};
}
`,
})(({ theme, isOutline, palette }) => {
var _a, _b;
return `
border-radius: ${theme.$.radius.colorPicker};
box-sizing: border-box;
${!isOutline
? `
background: ${(_b = (_a = theme.$.palette[palette].colorPicker) === null || _a === void 0 ? void 0 : _a.background) !== null && _b !== void 0 ? _b : theme.$.color.dynamic.gray};
`
: ''}
`;
});
;