import * as React from 'react'; import { IContextualMenuProps, IIconProps, Stack, IStackStyles } from '@fluentui/react'; import { CommandBarButton } 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 menuProps: IContextualMenuProps = { items: [ { key: 'emailMessage', text: 'Email message', iconProps: { iconName: 'Mail' }, }, { key: 'calendarEvent', text: 'Calendar event', iconProps: { iconName: 'Calendar' }, }, ], }; const addIcon: IIconProps = { iconName: 'Add' }; const mailIcon: IIconProps = { iconName: 'Mail' }; const stackStyles: Partial = { root: { height: 44 } }; export const ButtonCommandBarExample: React.FunctionComponent = props => { const { disabled, checked } = props; // Here we use a Stack to simulate a command bar. // The real CommandBar control also uses CommandBarButtons internally. return ( ); };