UNPKG

@fluentui/react

Version:

Reusable React components for building web experiences.

29 lines 1.21 kB
define(["require", "exports"], function (require, exports) { "use strict"; 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