UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

128 lines 4.61 kB
import { concatStyleSets, getFocusStyle, HighContrastSelector } from '../../../Styling'; import { memoizeFunction } from '../../../Utilities'; import { getStyles as getBaseButtonStyles } from '../BaseButton.styles'; import { getStyles as getSplitButtonStyles } from '../SplitButton/SplitButton.styles'; export var getStyles = memoizeFunction(function (theme, customStyles, focusInset, focusColor) { var baseButtonStyles = getBaseButtonStyles(theme); var baseSplitButtonStyles = getSplitButtonStyles(theme); var commandButtonHighContrastFocus = { left: 4, top: 4, bottom: 4, right: 4, border: 'none' }; var commandButtonStyles = { root: [ getFocusStyle(theme, -1, 'relative', commandButtonHighContrastFocus), { minWidth: '40px', backgroundColor: theme.palette.neutralLighter, color: theme.palette.neutralPrimary, padding: '0 4px', selectors: (_a = {}, _a[HighContrastSelector] = { border: 'none' }, _a) } ], rootHovered: { backgroundColor: theme.palette.neutralLight, color: theme.palette.neutralDark, selectors: (_b = {}, _b[HighContrastSelector] = { color: 'Highlight' }, _b) }, rootPressed: { backgroundColor: theme.palette.neutralQuaternaryAlt, color: theme.palette.black }, rootChecked: { backgroundColor: theme.palette.neutralQuaternaryAlt, color: theme.palette.black }, rootExpanded: { backgroundColor: theme.palette.neutralQuaternaryAlt, color: theme.palette.black }, rootCheckedHovered: { backgroundColor: theme.palette.neutralQuaternary, color: theme.palette.black }, // Split button styles splitButtonContainer: { selectors: (_c = {}, _c[HighContrastSelector] = { border: 'none' }, _c) }, splitButtonDivider: { backgroundColor: theme.palette.neutralTertiaryAlt, marginTop: 4, marginBottom: 4 }, splitButtonMenuButton: { backgroundColor: theme.palette.neutralLighter, color: theme.palette.neutralPrimary, selectors: { ':hover': { backgroundColor: theme.palette.neutralLight, color: theme.palette.neutralDark, selectors: (_d = {}, _d[HighContrastSelector] = { color: 'Highlight' }, _d) } } }, splitButtonMenuButtonDisabled: { backgroundColor: theme.palette.neutralLighter, selectors: { ':hover': { backgroundColor: theme.palette.neutralLighter } } }, splitButtonMenuButtonChecked: { backgroundColor: theme.palette.neutralQuaternaryAlt, color: theme.palette.black, selectors: { ':hover': { backgroundColor: theme.palette.neutralQuaternaryAlt } } }, splitButtonMenuButtonExpanded: { backgroundColor: theme.palette.neutralQuaternaryAlt, color: theme.palette.black, selectors: { ':hover': { backgroundColor: theme.palette.neutralQuaternaryAlt } } }, splitButtonMenuIcon: { color: theme.palette.neutralPrimary }, splitButtonMenuIconDisabled: { color: theme.palette.neutralTertiary }, label: { fontWeight: 'normal' // theme.fontWeights.semibold, }, icon: { color: theme.palette.themeDarkAlt }, menuIcon: { color: theme.palette.neutralSecondary } }; return concatStyleSets(baseButtonStyles, commandButtonStyles, baseSplitButtonStyles, customStyles); var _a, _b, _c, _d; }); //# sourceMappingURL=CommandBarButton.styles.js.map