diff --git a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarControlledToggleButton.stories.tsx b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarControlledToggleButton.stories.tsx index b7c64f7c6a34bf..df81a14dbcd057 100644 --- a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarControlledToggleButton.stories.tsx +++ b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarControlledToggleButton.stories.tsx @@ -14,20 +14,10 @@ export const ControlledToggleButton = () => { return ( + } name="textOptions" value="bold" /> + } name="textOptions" value="italic" /> } - name="textOptions" - value="bold" - /> - } - name="textOptions" - value="italic" - /> - } name="textOptions" value="underline" diff --git a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarDefault.stories.tsx b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarDefault.stories.tsx index ed66c91780a718..de1ca97daf817e 100644 --- a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarDefault.stories.tsx +++ b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarDefault.stories.tsx @@ -1,30 +1,23 @@ import * as React from 'react'; import { - TextBold24Regular, - TextItalic24Regular, - TextUnderline24Regular, - AlertSnooze24Regular, + FontIncrease24Regular, + FontDecrease24Regular, + TextFont24Regular, MoreHorizontal24Filled, } from '@fluentui/react-icons'; import { Menu, MenuTrigger, MenuPopover, MenuList, MenuItem } from '@fluentui/react-components'; -import { Toolbar, ToolbarButton, ToolbarDivider, ToolbarToggleButton } from '@fluentui/react-toolbar'; +import { Toolbar, ToolbarButton, ToolbarDivider } from '@fluentui/react-toolbar'; import type { ToolbarProps } from '@fluentui/react-toolbar'; export const Default = (props: Partial) => ( - } /> - } /> - } /> + } /> + } /> + } /> - } - /> - } /> + } /> diff --git a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarOverflow.stories.tsx b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarOverflow.stories.tsx index 7d95d4f7cc1913..5d2520e3b64cbc 100644 --- a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarOverflow.stories.tsx +++ b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarOverflow.stories.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { - TextBold16Regular, - TextItalic16Regular, - TextUnderline16Regular, + FontDecrease24Regular, + TextFont24Regular, + FontIncrease24Regular, MoreHorizontal20Filled, } from '@fluentui/react-icons'; import { Toolbar, ToolbarButton, ToolbarDivider } from '@fluentui/react-toolbar'; @@ -29,16 +29,16 @@ export const ToolbarOverflowMenuItem: React.FC = p return null; } - if (id.includes('underline')) { - return }> Underline; + if (id.includes('increase')) { + return }>Increase Font Size; } - if (id.includes('bold')) { - return }> Bold; + if (id.includes('decrease')) { + return }>Decrease Font Size; } - if (id.includes('italic')) { - return }> Italic; + if (id.includes('reset')) { + return }>Reset Font Size; } return Item {id}; @@ -66,7 +66,7 @@ export const OverflowMenu: React.FC<{ itemIds: Array> }> = ({ item return ( - - - - - - - - } /> - - -
-

Popover content

- -
-
-
- - - } /> - - -
-

Popover content - Accessibility

-
-
-
- -); +export const WithPopover = (props: Partial) => { + const [open, setOpen] = React.useState<'first' | 'second' | 'third' | 'fourth' | undefined>(); + + return ( + + setOpen(data.open ? 'first' : undefined)} + > + + } /> + + +
+

Insert Image

+ + +
+
+
+ setOpen(data.open ? 'second' : undefined)} + > + + } aria-label="Insert Table" /> + + +
+

Insert Table

+ + +
+
+
+ setOpen(data.open ? 'third' : undefined)} + > + + } /> + + +
+

Insert Formula

+ + +
+
+
+ + setOpen(data.open ? 'fourth' : undefined)} + > + + Quick Actions + + +
+

Quick Actions

+ + +
+
+
+
+ ); +}; diff --git a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarWithTooltip.stories.tsx b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarWithTooltip.stories.tsx index ddc2434481a3bf..4283413c47f561 100644 --- a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarWithTooltip.stories.tsx +++ b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarWithTooltip.stories.tsx @@ -1,20 +1,33 @@ import * as React from 'react'; -import { Toolbar, ToolbarButton, ToolbarDivider } from '@fluentui/react-toolbar'; +import { Toolbar, ToolbarToggleButton, ToolbarDivider, ToolbarButton } from '@fluentui/react-toolbar'; import type { ToolbarProps } from '@fluentui/react-toolbar'; import { Tooltip } from '@fluentui/react-components'; -import { CalendarMonthRegular, TextBold24Regular, TextItalic24Regular } from '@fluentui/react-icons'; +import { + TextUnderline24Regular, + TextBold24Regular, + TextItalic24Regular, + Highlight24Filled, +} from '@fluentui/react-icons'; export const WithTooltip = (props: Partial) => ( - - } /> + + } name="textOptions" value="bold" /> - - - } /> + + } name="textOptions" value="italic" /> + + + } + name="textOptions" + value="underline" + /> - - } /> + + + } /> );