From 9cb113165d6b17881e51f21f8bb74b313c7fd890 Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 11 Nov 2022 11:05:30 -0300 Subject: [PATCH 01/11] chore: add few improvements to toolbar stories --- .../ToolbarControlledToggleButton.stories.tsx | 16 +- .../Toolbar/ToolbarDefault.stories.tsx | 12 +- .../Toolbar/ToolbarOverflow.stories.tsx | 84 +++++------ .../stories/Toolbar/ToolbarRadio.stories.tsx | 25 ++-- .../ToolbarRadioControlled.stories.tsx | 16 +- .../stories/Toolbar/ToolbarSmall.stories.tsx | 19 +-- .../stories/Toolbar/ToolbarSubtle.stories.tsx | 13 +- .../Toolbar/ToolbarVertical.stories.tsx | 6 +- .../Toolbar/ToolbarWithPopover.stories.tsx | 140 +++++++++++++----- .../Toolbar/ToolbarWithTooltip.stories.tsx | 21 ++- 10 files changed, 199 insertions(+), 153 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 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..a156017810851e 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,8 +1,8 @@ import * as React from 'react'; import { - TextBold24Regular, - TextItalic24Regular, - TextUnderline24Regular, + FontIncrease24Regular, + FontDecrease24Regular, + TextFont24Regular, AlertSnooze24Regular, MoreHorizontal24Filled, } from '@fluentui/react-icons'; @@ -12,9 +12,9 @@ import type { ToolbarProps } from '@fluentui/react-toolbar'; export const Default = (props: Partial) => ( - } /> - } /> - } /> + } /> + } /> + } /> = 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}; @@ -125,94 +125,94 @@ export const OverflowItems = (props: Partial) => ( } + aria-label="Increase Font Size ( Group 1 )" + icon={} /> } + aria-label="Decrease Font Size ( Group 1 )" + icon={} /> } + aria-label="Increase Font Size ( Group 2 )" + icon={} /> } + aria-label="Decrease Font Size ( Group 2 )" + icon={} /> } + aria-label="Reset Font Size ( Group 2 )" + icon={} /> } + aria-label="Increase Font Size ( Group 2 )" + icon={} /> } + aria-label="Decrease Font Size ( Group 2 )" + icon={} /> } + aria-label="Increase Font Size ( Group 3 )" + icon={} /> } + aria-label="Decrease Font Size ( Group 3 )" + icon={} /> } + aria-label="Reset Font Size ( Group 3 )" + icon={} /> diff --git a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarRadio.stories.tsx b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarRadio.stories.tsx index 86949e4431231f..9d4894b80530ee 100644 --- a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarRadio.stories.tsx +++ b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarRadio.stories.tsx @@ -4,24 +4,19 @@ import { Toolbar, ToolbarRadioButton } from '@fluentui/react-toolbar'; import type { ToolbarProps } from '@fluentui/react-toolbar'; export const Radio = (props: Partial) => ( - + + } /> } - /> - } /> - } - /> + } /> ); diff --git a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarRadioControlled.stories.tsx b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarRadioControlled.stories.tsx index e4ee92e14503eb..f49e649c9a7d9f 100644 --- a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarRadioControlled.stories.tsx +++ b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarRadioControlled.stories.tsx @@ -16,24 +16,14 @@ export const ControlledRadio = (props: Partial) => { return ( + } /> } - /> - } /> - } - /> + } /> ); }; diff --git a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarSmall.stories.tsx b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarSmall.stories.tsx index ec7cffdaef4392..7239278e95d425 100644 --- a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarSmall.stories.tsx +++ b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarSmall.stories.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { - TextBold16Regular, - TextItalic16Regular, - TextUnderline16Regular, + FontIncrease24Regular, + FontDecrease24Regular, + TextFont24Regular, AlertSnooze16Regular, } from '@fluentui/react-icons'; import { Toolbar, ToolbarButton, ToolbarDivider, ToolbarToggleButton } from '@fluentui/react-toolbar'; @@ -10,15 +10,10 @@ import type { ToolbarProps } from '@fluentui/react-toolbar'; export const Small = (props: Partial) => ( - } /> - } /> - } /> + } /> + } /> + } /> - } - /> + } /> ); 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 0cd05053107141..15565aea4c0156 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,12 +1,17 @@ import * as React from 'react'; import { TextBold24Regular, TextItalic24Regular, TextUnderline24Regular } from '@fluentui/react-icons'; -import { Toolbar, ToolbarButton } from '@fluentui/react-toolbar'; +import { Toolbar, ToolbarToggleButton } from '@fluentui/react-toolbar'; import type { ToolbarProps } from '@fluentui/react-toolbar'; export const Subtle = (props: Partial) => ( - } /> - } /> - } /> + } name="textOptions" value="bold" /> + } name="textOptions" value="italic" /> + } + name="textOptions" + value="underline" + /> ); diff --git a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarVertical.stories.tsx b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarVertical.stories.tsx index 101631b357e4e2..55e8e5bf3abb7e 100644 --- a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarVertical.stories.tsx +++ b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarVertical.stories.tsx @@ -5,8 +5,8 @@ import type { ToolbarProps } from '@fluentui/react-toolbar'; export const Vertical = (props: Partial) => ( - } /> - } /> - } /> + } /> + } /> + } /> ); 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 2f379a241328e5..bcbd8ee6f471c2 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 @@ -4,40 +4,106 @@ import type { ToolbarProps } from '@fluentui/react-toolbar'; import { Popover, PopoverSurface, PopoverTrigger, Button } from '@fluentui/react-components'; import { CalendarMonthRegular, Accessibility24Filled } from '@fluentui/react-icons'; -export const WithPopover = (props: Partial) => ( - - - - See more... - - -
-

Popover content

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

Popover content

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

Popover content - Accessibility

-
-
-
-
-); +export const WithPopover = (props: Partial) => { + const [open, setOpen] = React.useState({ + first: false, + second: false, + third: false, + }); + + return ( + + { + setOpen(currOpen => ({ + ...currOpen, + first: !currOpen.first, + })); + }} + > + + See more... + + +
+

Popover content

+ +
+
+
+ + { + setOpen(currOpen => ({ + ...currOpen, + second: !currOpen.second, + })); + }} + > + + } /> + + +
+

Popover content

+ +
+
+
+ { + setOpen(currOpen => ({ + ...currOpen, + third: !currOpen.third, + })); + }} + > + + } /> + + +
+

Popover content - Accessibility

{' '} + +
+
+
+
+ ); +}; 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..9a5b64fa22a491 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,25 @@ import * as React from 'react'; -import { Toolbar, ToolbarButton, ToolbarDivider } from '@fluentui/react-toolbar'; +import { Toolbar, ToolbarToggleButton, ToolbarDivider } 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 } from '@fluentui/react-icons'; export const WithTooltip = (props: Partial) => ( - - } /> + + } name="textOptions" value="bold" /> - - } /> + + } name="textOptions" value="italic" /> - - } /> + + } + name="textOptions" + value="underline" + /> ); From c6ee1f7cf44e292ca0e7b065c29a4d6651806603 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 14 Nov 2022 13:00:06 -0300 Subject: [PATCH 02/11] chore: remove snooze from examples --- .../src/stories/Toolbar/ToolbarDefault.stories.tsx | 9 +-------- .../src/stories/Toolbar/ToolbarSmall.stories.tsx | 11 ++--------- 2 files changed, 3 insertions(+), 17 deletions(-) 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 a156017810851e..d8f24dfb0c1350 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 @@ -3,11 +3,10 @@ import { FontIncrease24Regular, FontDecrease24Regular, TextFont24Regular, - 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 { Toolbar, ToolbarButton, ToolbarDivider } from '@fluentui/react-toolbar'; import type { ToolbarProps } from '@fluentui/react-toolbar'; export const Default = (props: Partial) => ( @@ -16,12 +15,6 @@ export const Default = (props: Partial) => ( } /> } /> - } - /> } /> diff --git a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarSmall.stories.tsx b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarSmall.stories.tsx index 7239278e95d425..c7458febc493cb 100644 --- a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarSmall.stories.tsx +++ b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarSmall.stories.tsx @@ -1,11 +1,6 @@ import * as React from 'react'; -import { - FontIncrease24Regular, - FontDecrease24Regular, - TextFont24Regular, - AlertSnooze16Regular, -} from '@fluentui/react-icons'; -import { Toolbar, ToolbarButton, ToolbarDivider, ToolbarToggleButton } from '@fluentui/react-toolbar'; +import { FontIncrease24Regular, FontDecrease24Regular, TextFont24Regular } from '@fluentui/react-icons'; +import { Toolbar, ToolbarButton } from '@fluentui/react-toolbar'; import type { ToolbarProps } from '@fluentui/react-toolbar'; export const Small = (props: Partial) => ( @@ -13,7 +8,5 @@ export const Small = (props: Partial) => ( } /> } /> } /> - - } /> ); From e795f17c20f42b0f06bcd1b428aabefdf9f9b755 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 14 Nov 2022 13:24:31 -0300 Subject: [PATCH 03/11] chore: add label for more meu trigger --- .../src/stories/Toolbar/ToolbarOverflow.stories.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 9ee1ad219106af..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 @@ -66,7 +66,7 @@ export const OverflowMenu: React.FC<{ itemIds: Array> }> = ({ item return ( - + + + ); }; 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 9a5b64fa22a491..9f0efd4ff98803 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 @@ -6,14 +6,14 @@ import { TextUnderline24Regular, TextBold24Regular, TextItalic24Regular } from ' export const WithTooltip = (props: Partial) => ( - + } name="textOptions" value="bold" /> - + } name="textOptions" value="italic" /> - + } From 9ade33a69fd97b84abdba715ff0137837f311525 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 14 Nov 2022 13:43:29 -0300 Subject: [PATCH 05/11] chore: change approach on the popover example --- .../Toolbar/ToolbarWithPopover.stories.tsx | 93 +++---------------- 1 file changed, 15 insertions(+), 78 deletions(-) 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 f4155f7f6f9cc0..68ba3f6df95d20 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 @@ -5,102 +5,54 @@ import { Popover, PopoverSurface, PopoverTrigger, Button } from '@fluentui/react import { MathFormatLinear24Regular, Image24Regular, Table24Filled } from '@fluentui/react-icons'; export const WithPopover = (props: Partial) => { - const [open, setOpen] = React.useState({ - first: false, - second: false, - third: false, - fourth: false, - }); + const [open, setOpen] = React.useState<'first' | 'second' | 'third' | 'fourth' | undefined>(); return ( { - setOpen(currOpen => ({ - ...currOpen, - first: !currOpen.first, - })); - }} + open={open === 'first'} + onOpenChange={(_, data) => setOpen(data.open ? 'first' : undefined)} > - } aria-label="Insert Table" /> + } />

Popover content

- +
{ - setOpen(currOpen => ({ - ...currOpen, - second: !currOpen.second, - })); - }} + open={open === 'second'} + onOpenChange={(_, data) => setOpen(data.open ? 'second' : undefined)} > - } /> + } aria-label="Insert Table" />

Popover content

- +
{ - setOpen(currOpen => ({ - ...currOpen, - third: !currOpen.third, - })); - }} + open={open === 'third'} + onOpenChange={(_, data) => setOpen(data.open ? 'third' : undefined)} > } />
-

Popover content - Formula

{' '} - +

Popover content - Formula

@@ -108,30 +60,15 @@ export const WithPopover = (props: Partial) => { { - setOpen(currOpen => ({ - ...currOpen, - fourth: !currOpen.third, - })); - }} + open={open === 'fourth'} + onOpenChange={(_, data) => setOpen(data.open ? 'fourth' : undefined)} > Quick Actions
-

Popover content - Quick Actions

{' '} - +

Popover content - Quick Actions

From 7c8d6c61c788b11c2f89eb68666ab984851622c6 Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 17 Nov 2022 22:17:51 -0300 Subject: [PATCH 06/11] chore: add new round of feedback --- .../src/stories/Toolbar/ToolbarDefault.stories.tsx | 2 +- .../src/stories/Toolbar/ToolbarRadio.stories.tsx | 8 ++++---- .../Toolbar/ToolbarRadioControlled.stories.tsx | 10 +++++----- .../src/stories/Toolbar/ToolbarVertical.stories.tsx | 8 ++++---- .../stories/Toolbar/ToolbarWithPopover.stories.tsx | 12 +++++++++--- 5 files changed, 23 insertions(+), 17 deletions(-) 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 d8f24dfb0c1350..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 @@ -17,7 +17,7 @@ export const Default = (props: Partial) => ( - } /> + } /> diff --git a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarRadio.stories.tsx b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarRadio.stories.tsx index 9d4894b80530ee..6f61d549524dcd 100644 --- a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarRadio.stories.tsx +++ b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarRadio.stories.tsx @@ -7,16 +7,16 @@ export const Radio = (props: Partial) => ( - } /> + } /> } /> - } /> + } /> ); diff --git a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarRadioControlled.stories.tsx b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarRadioControlled.stories.tsx index 7f6f3cfb321c75..21aa8248b23899 100644 --- a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarRadioControlled.stories.tsx +++ b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarRadioControlled.stories.tsx @@ -5,7 +5,7 @@ import type { ToolbarProps } from '@fluentui/react-toolbar'; export const ControlledRadio = (props: Partial) => { const [checkedValues, setCheckedValues] = React.useState>({ - edit: ['italic', 'bold'], + edit: ['italic', 'center'], }); const onChange: ToolbarProps['onCheckedValueChange'] = (e, { name, checkedItems }) => { @@ -19,17 +19,17 @@ export const ControlledRadio = (props: Partial) => { checkedValues={checkedValues} onCheckedValueChange={onChange} defaultCheckedValues={{ - textOptions: ['bold'], + textOptions: ['center'], }} > - } /> + } /> } /> - } /> + } /> ); }; diff --git a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarVertical.stories.tsx b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarVertical.stories.tsx index 55e8e5bf3abb7e..6696758d4375a5 100644 --- a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarVertical.stories.tsx +++ b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarVertical.stories.tsx @@ -1,12 +1,12 @@ import * as React from 'react'; import { TextBold24Regular, TextItalic24Regular, TextUnderline24Regular } from '@fluentui/react-icons'; -import { Toolbar, ToolbarButton } from '@fluentui/react-toolbar'; +import { Toolbar, ToolbarToggleButton } from '@fluentui/react-toolbar'; import type { ToolbarProps } from '@fluentui/react-toolbar'; export const Vertical = (props: Partial) => ( - } /> - } /> - } /> + } /> + } /> + } /> ); 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 68ba3f6df95d20..b3a69e2f03c5b1 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 @@ -16,11 +16,12 @@ export const WithPopover = (props: Partial) => { onOpenChange={(_, data) => setOpen(data.open ? 'first' : undefined)} > - } /> + } />

Popover content

+
@@ -37,6 +38,7 @@ export const WithPopover = (props: Partial) => {

Popover content

+
@@ -52,7 +54,9 @@ export const WithPopover = (props: Partial) => {
-

Popover content - Formula

+

Popover content - Formula

+ +
@@ -68,7 +72,9 @@ export const WithPopover = (props: Partial) => {
-

Popover content - Quick Actions

+

Popover content - Quick Actions

+ +
From 58535f981d8e2b5f9f3aeadbff8252992c00f960 Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 18 Nov 2022 23:15:19 -0300 Subject: [PATCH 07/11] chore: update toolbar popover example --- .../src/stories/Toolbar/ToolbarWithPopover.stories.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 b3a69e2f03c5b1..50c3aa0f2b8585 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 @@ -21,7 +21,7 @@ export const WithPopover = (props: Partial) => {

Popover content

- +
@@ -38,7 +38,7 @@ export const WithPopover = (props: Partial) => {

Popover content

- +
@@ -55,7 +55,7 @@ export const WithPopover = (props: Partial) => {

Popover content - Formula

- +
@@ -73,7 +73,7 @@ export const WithPopover = (props: Partial) => {

Popover content - Quick Actions

- +
From 5c58a2f013aa06195f515541bdea11dfbb2fc5b5 Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 18 Nov 2022 23:17:25 -0300 Subject: [PATCH 08/11] chore: update toolbar popover example --- .../src/stories/Toolbar/ToolbarWithPopover.stories.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 50c3aa0f2b8585..74368a6c0ee473 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 @@ -20,7 +20,7 @@ export const WithPopover = (props: Partial) => {
-

Popover content

+

Insert Image

@@ -37,7 +37,7 @@ export const WithPopover = (props: Partial) => {
-

Popover content

+

Insert Table

@@ -54,7 +54,7 @@ export const WithPopover = (props: Partial) => {
-

Popover content - Formula

+

Insert Formula

@@ -72,7 +72,7 @@ export const WithPopover = (props: Partial) => {
-

Popover content - Quick Actions

+

Quick Actions

From 1fcae8fb230ee7918a201d7fc1651b30e6346a80 Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 18 Nov 2022 23:19:10 -0300 Subject: [PATCH 09/11] chore: fix controlled radio example --- .../src/stories/Toolbar/ToolbarRadioControlled.stories.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarRadioControlled.stories.tsx b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarRadioControlled.stories.tsx index 21aa8248b23899..321dab99387cee 100644 --- a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarRadioControlled.stories.tsx +++ b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarRadioControlled.stories.tsx @@ -19,7 +19,7 @@ export const ControlledRadio = (props: Partial) => { checkedValues={checkedValues} onCheckedValueChange={onChange} defaultCheckedValues={{ - textOptions: ['center'], + textStyle: ['center'], }} > } /> From 05061410805cc698d782f67846ca4cb632606f40 Mon Sep 17 00:00:00 2001 From: Charles Date: Sat, 19 Nov 2022 05:13:31 -0300 Subject: [PATCH 10/11] chore: update controlled radio example --- .../Toolbar/ToolbarRadioControlled.stories.tsx | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarRadioControlled.stories.tsx b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarRadioControlled.stories.tsx index 321dab99387cee..9b8503b00b540a 100644 --- a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarRadioControlled.stories.tsx +++ b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarRadioControlled.stories.tsx @@ -5,7 +5,7 @@ import type { ToolbarProps } from '@fluentui/react-toolbar'; export const ControlledRadio = (props: Partial) => { const [checkedValues, setCheckedValues] = React.useState>({ - edit: ['italic', 'center'], + textOptions: ['center'], }); const onChange: ToolbarProps['onCheckedValueChange'] = (e, { name, checkedItems }) => { @@ -15,21 +15,15 @@ export const ControlledRadio = (props: Partial) => { }; return ( - - } /> + + } /> } /> - } /> + } /> ); }; From ed3282b881901a07cc0f3e29bb67f95b259ede94 Mon Sep 17 00:00:00 2001 From: Charles Date: Sat, 19 Nov 2022 05:16:12 -0300 Subject: [PATCH 11/11] chore: update with tooltip example --- .../stories/Toolbar/ToolbarWithTooltip.stories.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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 9f0efd4ff98803..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,15 +1,19 @@ import * as React from 'react'; -import { Toolbar, ToolbarToggleButton, 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 { TextUnderline24Regular, 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" /> @@ -21,5 +25,9 @@ export const WithTooltip = (props: Partial) => ( value="underline" /> + + + } /> + );