UNPKG

@uifabric/experiments

Version:

Experimental React components for building experiences for Microsoft 365.

72 lines 3.29 kB
define(["require", "exports", "@uifabric/foundation/lib/next/composed", "../Button.state", "../Button.styles", "../Button.view"], function (require, exports, composed_1, Button_state_1, Button_styles_1, Button_view_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /* eslint-disable deprecation/deprecation */ var baseTokens = function (props, theme) { var palette = theme.palette, semanticColors = theme.semanticColors; return { backgroundColor: palette.white, backgroundColorHovered: palette.neutralLighter, backgroundColorPressed: semanticColors.buttonBackgroundPressed, borderRadius: 0, borderWidth: 0, childrenGap: 8, contentPadding: '0px 8px', color: semanticColors.buttonText, colorHovered: semanticColors.buttonTextHovered, colorPressed: semanticColors.buttonTextPressed, cursor: 'pointer', highContrastBorderColor: 'transparent', highContrastBorderColorHovered: 'transparent', highContrastBorderColorPressed: 'transparent', highContrastColorHovered: 'Highlight', highContrastColorPressed: 'Highlight', highContrastIconColorHovered: 'Highlight', highContrastIconColorPressed: 'Highlight', iconColor: semanticColors.buttonText, iconColorHovered: palette.themeDarkAlt, iconColorPressed: palette.themeDark, minHeight: 0, minWidth: 40, textWeight: 'normal', }; }; var disabledTokens = function (props, theme) { var palette = theme.palette, semanticColors = theme.semanticColors; return { backgroundColor: palette.white, backgroundColorHovered: palette.white, backgroundColorPressed: palette.white, color: semanticColors.buttonTextDisabled, colorHovered: semanticColors.buttonTextDisabled, colorPressed: semanticColors.buttonTextDisabled, cursor: 'default', highContrastColor: 'GrayText', highContrastColorHovered: 'GrayText', highContrastColorPressed: 'GrayText', highContrastIconColor: 'GrayText', highContrastIconColorHovered: 'GrayText', highContrastIconColorPressed: 'GrayText', iconColor: semanticColors.disabledBodySubtext, iconColorHovered: semanticColors.disabledBodySubtext, iconColorPressed: semanticColors.disabledBodySubtext, }; }; var CommandBarButtonTokens = function (props, theme) { return [ baseTokens, props.disabled && disabledTokens, ]; }; /** * @deprecated This component was experimental and is not longer being developed on, nor will it be supported in the * future. */ exports.CommandBarButton = composed_1.composed({ displayName: 'CommandBarButton', slots: Button_view_1.ButtonSlots, state: Button_state_1.useButtonState, styles: Button_styles_1.ButtonStyles, tokens: CommandBarButtonTokens, view: Button_view_1.ButtonView, }); }); //# sourceMappingURL=CommandBarButton.js.map