@up-group-ui/react-controls
Version:
Up shared react controls
23 lines • 1.05 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStyle = void 0;
var typestyle_1 = require("typestyle");
var utils_1 = require("../../../Common/theming/utils");
var getStyle = function (props) {
return (0, typestyle_1.style)({
display: 'flex',
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
borderRadius: props.rounded === true ? (0, utils_1.toRem)(18) : (0, utils_1.toRem)(16),
padding: '0',
fontWeight: 700,
color: props.intent !== null ? props.theme.colorMap[props.intent + "Fg"] : props.color,
width: props.rounded === true ? (0, utils_1.toRem)(32) : 'auto',
height: props.rounded === true ? (0, utils_1.toRem)(32) : 'auto',
backgroundColor: props.intent !== null ? props.theme.colorMap["" + props.intent] : props.background,
cursor: props.onClick || props.onMouseEnter || props.onMouseLeave ? 'pointer' : 'auto',
});
};
exports.getStyle = getStyle;
//# sourceMappingURL=styles.js.map