office-ui-fabric-react
Version:
Reusable React components for building experiences for Microsoft 365.
30 lines • 1.26 kB
JavaScript
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TextStyles = function (props, theme) {
var as = props.as, className = props.className, block = props.block, nowrap = props.nowrap, variant = props.variant;
var fonts = theme.fonts;
var variantObject = fonts[variant || 'medium'];
return {
root: [
theme.fonts.medium,
{
display: block ? (as === 'td' ? 'table-cell' : 'block') : 'inline',
fontFamily: variantObject.fontFamily,
fontSize: variantObject.fontSize,
fontWeight: variantObject.fontWeight,
color: variantObject.color,
mozOsxFontSmoothing: variantObject.MozOsxFontSmoothing,
webkitFontSmoothing: variantObject.WebkitFontSmoothing,
},
nowrap && {
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
},
className,
],
};
};
});
//# sourceMappingURL=Text.styles.js.map