UNPKG

@atlaskit/atlassian-navigation

Version:

A horizontal navigation component for Atlassian apps.

32 lines 922 B
export const getPrimaryButtonTheme = ({ mode: { primaryButton } }) => (current, props) => { const { buttonStyles, spinnerStyles } = current(props); return { buttonStyles: { ...buttonStyles, ...primaryButton.default, ...(props.isSelected && primaryButton.selected), fontWeight: "var(--ds-font-weight-medium, 500)", padding: `0 ${"var(--ds-space-050, 4px)"}`, marginLeft: 0, marginRight: 0, ':hover': props.isSelected ? primaryButton.selectedHover : primaryButton.hover, ':focus': primaryButton.focus, // :active doesn't work in FF, because we do a // e.preventDefault() on mouse down in Button. // '&&' is required to add more CSS specificity // && it not a valid CSSObject property // @ts-ignore '&&': { ...(props.state === 'active' && primaryButton.active) } }, spinnerStyles }; };