@uifabric/experiments
Version:
Experimental React components for building experiences for Microsoft 365.
47 lines • 1.7 kB
JavaScript
// Temporary import file to experiment with next version of foundation.
import { composed } from '@uifabric/foundation/lib/next/composed';
import { useButtonState as state } from '../Button.state';
import { ButtonStyles as styles, ButtonTokens } from '../Button.styles';
import { ButtonSlots as slots, ButtonView as view } from '../Button.view';
/* eslint-disable deprecation/deprecation */
var baseTokens = function (props, theme) {
var palette = theme.palette;
return {
borderColor: palette.neutralTertiaryAlt,
borderColorHovered: palette.neutralTertiaryAlt,
borderColorPressed: palette.neutralTertiaryAlt,
contentPadding: 0,
cursor: 'pointer',
height: 24,
minHeight: 24,
minWidth: 84,
width: 84,
};
};
var disabledTokens = function (props, theme) {
var semanticColors = theme.semanticColors;
return {
borderColor: semanticColors.buttonBorderDisabled,
borderColorHovered: semanticColors.buttonBorderDisabled,
borderColorPressed: semanticColors.buttonBorderDisabled,
cursor: 'default',
};
};
/** @deprecated */
export var MessageBarButtonTokens = function (props, theme) {
var regularTokens = ButtonTokens(props, theme);
return [regularTokens, baseTokens, props.disabled && disabledTokens];
};
/**
* @deprecated This component was experimental and is not longer being developed on, nor will it be supported in the
* future.
*/
export var MessageBarButton = composed({
displayName: 'MessageBarButton',
slots: slots,
state: state,
styles: styles,
tokens: MessageBarButtonTokens,
view: view,
});
//# sourceMappingURL=MessageBarButton.js.map