UNPKG

@fluentui/react-northstar

Version:
70 lines (69 loc) 2.25 kB
import { getColorSchemeKey } from '../../colors'; import { translateAlignProp } from '../../../../styles/translateAlignProp'; export var textStyles = { root: function root(_ref) { var p = _ref.props, v = _ref.variables; var colors = v.colorScheme[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: 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 }); } }; //# sourceMappingURL=textStyles.js.map