import * as React from 'react'; import { HighContrastSelector, Label, IContextualMenuProps, IIconProps } from '@fluentui/react'; import { IButtonStyles, IconButton } from '@fluentui/react/lib/Button'; export interface IButtonExampleProps { // These are set based on the toggles shown above the examples (not needed in real code) disabled?: boolean; checked?: boolean; } const customSplitButtonStyles: IButtonStyles = { splitButtonMenuButton: { backgroundColor: 'white', width: 28, border: 'none' }, splitButtonMenuIcon: { fontSize: '7px' }, splitButtonDivider: { backgroundColor: '#c8c8c8', width: 1, right: 26, position: 'absolute', top: 4, bottom: 4 }, splitButtonContainer: { selectors: { [HighContrastSelector]: { border: 'none' }, }, }, }; const menuProps: IContextualMenuProps = { items: [ { key: 'emailMessage', text: 'Email message', iconProps: { iconName: 'Mail' }, }, { key: 'calendarEvent', text: 'Calendar event', iconProps: { iconName: 'Calendar' }, }, ], }; const addIcon: IIconProps = { iconName: 'Add' }; export const ButtonSplitCustomExample: React.FunctionComponent = props => { const { disabled, checked } = props; return (
); }; function _alertClicked(): void { alert('Clicked'); }