office-ui-fabric-react
Version:
Reusable React components for building experiences for Office 365.
83 lines • 2.97 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
var Styling_1 = require("../../Styling");
var GlobalClassNames = {
root: 'ms-Link'
};
exports.getStyles = function (props) {
var className = props.className, isButton = props.isButton, isDisabled = props.isDisabled, theme = props.theme;
var semanticColors = theme.semanticColors;
var classNames = Styling_1.getGlobalClassNames(GlobalClassNames, theme);
return {
root: [
classNames.root,
Styling_1.getFocusStyle(theme, -2),
{
color: semanticColors.link
},
isButton && {
background: 'none',
backgroundColor: 'transparent',
border: 'none',
cursor: 'pointer',
display: 'inline',
fontSize: 'inherit',
margin: 0,
overflow: 'inherit',
padding: 0,
textAlign: 'left',
textOverflow: 'inherit',
userSelect: 'text',
borderBottom: '1px solid transparent',
selectors: (_a = {},
_a[Styling_1.HighContrastSelectorBlack] = {
color: '#FFFF00'
},
_a[Styling_1.HighContrastSelectorWhite] = {
color: '#00009F'
},
_a['@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)'] = {
// For IE high contrast mode
borderBottom: 'none'
},
_a)
},
!isButton && {
textDecoration: 'none'
},
isDisabled && [
'is-disabled',
{
color: semanticColors.disabledText,
cursor: 'default'
},
{
selectors: {
'&:link, &:visited': {
pointerEvents: 'none'
}
}
}
],
!isDisabled && {
selectors: {
'&:active, &:hover, &:active:hover': {
color: semanticColors.linkHovered,
selectors: (_b = {},
_b[Styling_1.HighContrastSelector] = {
textDecoration: 'underline'
},
_b)
},
'&:focus': {
color: semanticColors.link
}
}
},
classNames.root,
className
]
};
var _a, _b;
};
//# sourceMappingURL=Link.styles.js.map
;