UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

81 lines 2.94 kB
import { getFocusStyle, getGlobalClassNames, HighContrastSelector, HighContrastSelectorWhite, HighContrastSelectorBlack } from '../../Styling'; var GlobalClassNames = { root: 'ms-Link' }; export var getStyles = function (props) { var className = props.className, isButton = props.isButton, isDisabled = props.isDisabled, theme = props.theme; var semanticColors = theme.semanticColors; var classNames = getGlobalClassNames(GlobalClassNames, theme); return { root: [ classNames.root, 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[HighContrastSelectorBlack] = { color: '#FFFF00' }, _a[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[HighContrastSelector] = { textDecoration: 'underline' }, _b) }, '&:focus': { color: semanticColors.link } } }, classNames.root, className ] }; var _a, _b; }; //# sourceMappingURL=Link.styles.js.map