UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

68 lines 2.29 kB
import { getFocusStyle, getGlobalClassNames, HighContrastSelector } 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), { 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' }, !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: (_a = {}, _a[HighContrastSelector] = { textDecoration: 'underline' }, _a) }, '&:focus': { color: semanticColors.link } } }, classNames.root, className ] }; var _a; }; //# sourceMappingURL=Link.styles.js.map