@fluentui/react
Version:
Reusable React components for building web experiences.
27 lines • 1.04 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TextStyles = void 0;
var TextStyles = function (props, theme) {
var as = props.as, className = props.className, block = props.block, nowrap = props.nowrap, variant = props.variant;
var fonts = theme.fonts, semanticColors = theme.semanticColors;
var variantObject = fonts[variant || 'medium'];
return {
root: [
variantObject,
{
color: variantObject.color || semanticColors.bodyText,
display: block ? (as === 'td' ? 'table-cell' : 'block') : 'inline',
mozOsxFontSmoothing: variantObject.MozOsxFontSmoothing,
webkitFontSmoothing: variantObject.WebkitFontSmoothing,
},
nowrap && {
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
},
className,
],
};
};
exports.TextStyles = TextStyles;
//# sourceMappingURL=Text.styles.js.map