@up-group-ui/react-controls
Version:
Up shared react controls
36 lines • 1.18 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStyles = void 0;
var tslib_1 = require("tslib");
var typestyle_1 = require("typestyle");
var csx_1 = require("csx");
var utils_1 = require("../../../Common/theming/utils");
var plainStyle = function (props) {
if (props.plain) {
return {
textDecoration: 'inherit',
lineHeight: 'inherit',
cursor: 'pointer',
};
}
return {
textDecoration: 'underline',
lineHeight: 'inherit',
cursor: 'pointer',
};
};
var colorStyle = function (props) {
return {
color: props.color || props.theme.colorMap.primary,
$nest: {
'&:hover': {
color: props.color ? (0, csx_1.color)(props.color).darken(0.1).toHexString() : props.theme.colorMap.primary,
},
},
};
};
var getStyles = function (props) {
return (0, typestyle_1.style)((0, tslib_1.__assign)((0, tslib_1.__assign)({ fontSize: (0, utils_1.toRem)(16), lineHeight: 1.5, fontWeight: 400 }, colorStyle(props)), plainStyle(props)));
};
exports.getStyles = getStyles;
//# sourceMappingURL=styles.js.map