UNPKG

@up-group-ui/react-controls

Version:
47 lines 1.76 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getItemStyles = exports.getListStyles = exports.getCustomStyle = void 0; var utils_1 = require("../../../Common/theming/utils"); var getCustomStyle = function (key, props, selectedItem, item) { if (props.customStyles && props.customStyles[key]) { return props.customStyles[key](props, selectedItem); } return {}; }; exports.getCustomStyle = getCustomStyle; var getListStyles = function (props, selectedItem, item) { return ({ borderRadius: (0, utils_1.toRem)(25), display: 'flex', flexDirection: 'row', listStyle: 'none', height: (0, utils_1.toRem)(126), padding: 0, width: '100%', marginLeft: (0, utils_1.toRem)(20), $nest: { 'ul.up-carousel li:first-child': { marginLeft: selectedItem != null ? (0, utils_1.toRem)(-107) : 0, }, }, }); }; exports.getListStyles = getListStyles; var getItemStyles = function (props, selectedItem, item) { return ({ backgroundColor: item.color, opacity: 1, borderRadius: (0, utils_1.toRem)(10), padding: (0, utils_1.toRem)(20), overflow: 'hidden', cursor: 'pointer', width: (0, utils_1.toRem)(225), height: "" + (selectedItem && selectedItem.key === item.key ? (0, utils_1.toRem)(250) : (0, utils_1.toRem)(126)), flex: (selectedItem && selectedItem.key === item.key ? (0, utils_1.toRem)(440) : (0, utils_1.toRem)(225)) + " 0 0", marginRight: '5px', marginTop: "" + (selectedItem && selectedItem.key === item.key ? (0, utils_1.toRem)(-62) : 0), $nest: { 'li:lastChild': { marginRight: 0, }, }, }); }; exports.getItemStyles = getItemStyles; //# sourceMappingURL=styles.js.map