From 0fba0cd56df4868f71204eb5898fd8c03f4cac7b Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 18 Oct 2022 10:05:46 -0300 Subject: [PATCH] docs: improve Toolbar docs examples --- .../ToolbarControlledToggleButton.stories.tsx | 9 ++--- .../Toolbar/ToolbarDefault.stories.tsx | 33 +++++++++++++++---- .../Toolbar/ToolbarOverflow.stories.tsx | 2 -- .../stories/Toolbar/ToolbarSmall.stories.tsx | 17 ++++++---- .../stories/Toolbar/ToolbarSubtle.stories.tsx | 13 +++----- .../Toolbar/ToolbarWithPopover.stories.tsx | 6 ++-- .../Toolbar/ToolbarWithTooltip.stories.tsx | 9 ++--- 7 files changed, 50 insertions(+), 39 deletions(-) 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 5cd3178d4a732..7b221bc1051a0 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 @@ -1,4 +1,5 @@ import * as React from 'react'; +import { TextBold24Regular, TextItalic24Regular } from '@fluentui/react-icons'; import { Toolbar, ToolbarToggleButton, ToolbarProps } from '@fluentui/react-toolbar'; export const ControlledToggleButton = () => { @@ -11,12 +12,8 @@ export const ControlledToggleButton = () => { return ( - - Enable Group - - - Enable Group - + } name="edit" value="cut" /> + } name="edit" value="paste" /> ); }; 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 5e952f62fa697..18f853b8b1707 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,16 +1,35 @@ import * as React from 'react'; +import { + TextBold24Regular, + TextItalic24Regular, + TextUnderline24Regular, + AlertSnooze24Regular, + 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 type { ToolbarProps } from '@fluentui/react-toolbar'; export const Default = (props: Partial) => ( - Click me - Click me - - Click me - - Click me to Toggle - + } /> + } /> + } /> + } /> + + + } /> + + + + + New + New Window + Open File + Open Folder + + + ); 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 922622d6775ec..b0ba5639e8cc8 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 @@ -198,8 +198,6 @@ export const OverflowItems = (props: Partial) => ( icon={} /> - - ) => ( - Click me - Click me - - Click me - - Click me to Toggle - + } /> + } /> + } /> + } /> ); diff --git a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarSubtle.stories.tsx b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarSubtle.stories.tsx index 0c41bc5035084..fcd9f3dc4c506 100644 --- a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarSubtle.stories.tsx +++ b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarSubtle.stories.tsx @@ -1,15 +1,12 @@ import * as React from 'react'; -import { Toolbar, ToolbarButton, ToolbarDivider, ToolbarToggleButton } from '@fluentui/react-toolbar'; +import { TextBold24Regular, TextItalic24Regular, TextUnderline24Regular } from '@fluentui/react-icons'; +import { Toolbar, ToolbarButton } from '@fluentui/react-toolbar'; import type { ToolbarProps } from '@fluentui/react-toolbar'; export const Subtle = (props: Partial) => ( - Click me - Click me - Click me - - - Click me to Toggle - + } /> + } /> + } /> ); diff --git a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarWithPopover.stories.tsx b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarWithPopover.stories.tsx index a0e2a2f0ad029..ab12c651199a9 100644 --- a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarWithPopover.stories.tsx +++ b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarWithPopover.stories.tsx @@ -6,16 +6,16 @@ import { CalendarMonthRegular } from '@fluentui/react-icons'; export const WithPopover = (props: Partial) => ( - + - Click here + See more...
Popover content
- + } /> 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 4572f1afe833e..25d25c88d8732 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 @@ -2,19 +2,16 @@ import * as React from 'react'; import { Toolbar, ToolbarButton, ToolbarDivider } from '@fluentui/react-toolbar'; import type { ToolbarProps } from '@fluentui/react-toolbar'; import { Tooltip } from '@fluentui/react-components'; -import { CalendarMonthRegular } from '@fluentui/react-icons'; +import { CalendarMonthRegular, TextBold24Regular } from '@fluentui/react-icons'; export const WithTooltip = (props: Partial) => ( - - Hover me + + } /> } /> - Click me - Hover me - );