40 lines
1.4 KiB
JavaScript
40 lines
1.4 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.getStyles = void 0;
|
|
var Styling_1 = require("../../Styling");
|
|
var inheritFont = { fontFamily: 'inherit' };
|
|
var GlobalClassNames = {
|
|
root: 'ms-Fabric',
|
|
bodyThemed: 'ms-Fabric-bodyThemed',
|
|
};
|
|
var getStyles = function (props) {
|
|
var applyTheme = props.applyTheme, className = props.className, preventBlanketFontInheritance = props.preventBlanketFontInheritance, theme = props.theme;
|
|
var classNames = (0, Styling_1.getGlobalClassNames)(GlobalClassNames, theme);
|
|
return {
|
|
root: [
|
|
classNames.root,
|
|
theme.fonts.medium,
|
|
{
|
|
color: theme.palette.neutralPrimary,
|
|
},
|
|
!preventBlanketFontInheritance && {
|
|
'& button': inheritFont,
|
|
'& input': inheritFont,
|
|
'& textarea': inheritFont,
|
|
},
|
|
// apply theme to only if applyTheme is true
|
|
applyTheme && {
|
|
color: theme.semanticColors.bodyText,
|
|
backgroundColor: theme.semanticColors.bodyBackground,
|
|
},
|
|
className,
|
|
],
|
|
bodyThemed: [
|
|
{
|
|
backgroundColor: theme.semanticColors.bodyBackground,
|
|
},
|
|
],
|
|
};
|
|
};
|
|
exports.getStyles = getStyles;
|
|
//# sourceMappingURL=Fabric.styles.js.map
|