UNPKG

@fluentui/react-northstar

Version:
75 lines (73 loc) 2.38 kB
"use strict"; exports.__esModule = true; exports.textStyles = void 0; var _colors = require("../../colors"); var _translateAlignProp = require("../../../../styles/translateAlignProp"); var textStyles = { root: function root(_ref) { var p = _ref.props, v = _ref.variables; var colors = v.colorScheme[(0, _colors.getColorSchemeKey)(p.color)]; return Object.assign({}, p.color && { color: colors.foreground }, p.atMention === true && { color: v.atMentionOtherColor }, p.truncated && { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }, p.disabled && { color: v.disabledColor }, p.error && { color: v.errorColor }, p.success && { color: v.successColor }, p.temporary && { fontStyle: 'italic' }, p.align && { display: 'block', textAlign: (0, _translateAlignProp.translateAlignProp)(p.align) }, p.weight === 'light' && { fontWeight: v.fontWeightLight }, p.weight === 'semilight' && { fontWeight: v.fontWeightSemilight }, p.weight === 'regular' && { fontWeight: v.fontWeightRegular }, p.weight === 'semibold' && { fontWeight: v.fontWeightSemibold }, p.weight === 'bold' && { fontWeight: v.fontWeightBold }, p.size === 'smallest' && { fontSize: v.fontSizeSmallest, lineHeight: v.fontLineHeightSmallest }, p.size === 'smaller' && { fontSize: v.fontSizeSmaller, lineHeight: v.fontLineHeightSmaller }, p.size === 'small' && { fontSize: v.fontSizeSmall, lineHeight: v.fontLineHeightSmall }, p.size === 'medium' && { fontSize: v.fontSizeMedium, lineHeight: v.fontLineHeightMedium }, p.size === 'large' && { fontSize: v.fontSizeLarge, lineHeight: v.fontLineHeightLarge }, p.size === 'larger' && { fontSize: v.fontSizeLarger, lineHeight: v.fontLineHeightLarger }, p.size === 'largest' && { fontSize: v.fontSizeLargest, lineHeight: v.fontLineHeightLargest }, p.atMention === 'me' && { color: v.atMentionMeColor, fontWeight: v.atMentionMeFontWeight }, p.timestamp && { color: v.timestampColor }, p.important && { color: v.importantColor, fontWeight: v.importantWeight }); } }; exports.textStyles = textStyles; //# sourceMappingURL=textStyles.js.map