office-ui-fabric-react
Version:
Reusable React components for building experiences for Office 365.
61 lines • 1.98 kB
JavaScript
import { getFocusStyle, HighContrastSelector } from '../../Styling';
export var getStyles = function (props) {
var className = props.className, isButton = props.isButton, isDisabled = props.isDisabled, theme = props.theme;
var semanticColors = theme.semanticColors;
return {
root: [
'ms-Link',
className,
getFocusStyle(theme),
{
color: semanticColors.link,
},
isButton && {
background: 'none',
border: 'none',
cursor: 'pointer',
display: 'inline',
fontSize: 'inherit',
margin: 0,
overflow: 'inherit',
padding: 0,
textAlign: 'left',
textOverflow: 'inherit',
selectors: (_a = {},
_a[HighContrastSelector] = {
color: 'Highlight'
},
_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
},
'&:focus': {
color: semanticColors.link
}
}
}
]
};
var _a;
};
//# sourceMappingURL=Link.styles.js.map