import * as React from 'react'; import type { JSXElement } from '@fluentui/react-components'; import { makeStyles, Menu, MenuItem, MenuList, MenuPopover, MenuTrigger, SplitButton, Tooltip, } from '@fluentui/react-components'; import { CalendarMonthRegular, FilterRegular } from '@fluentui/react-icons'; import type { MenuButtonProps } from '@fluentui/react-components'; const useStyles = makeStyles({ wrapper: { columnGap: '15px', display: 'flex', minWidth: 'min-content', }, }); export const Icon = (): JSXElement => { const [primaryActionButtonRef, setPrimaryActionButtonRef] = React.useState< HTMLButtonElement | HTMLAnchorElement | null >(null); const styles = useStyles(); return (
{(triggerProps: MenuButtonProps) => ( }> With calendar icon before contents )} Item a Item b {(triggerProps: MenuButtonProps) => ( } iconPosition="after"> With calendar icon after contents )} Item a Item b {(triggerProps: MenuButtonProps) => ( } menuIcon={}> With calendar icon and custom filter menu icon )} Item a Item b {(triggerProps: MenuButtonProps) => ( } /> )} Item a Item b
); }; Icon.parameters = { docs: { description: { story: 'SplitButton has an `icon` slot that renders before the text, and `menuIcon` slot that renders after the text.', }, }, };