From 8d33cf0e33e5cf9cc569d275d42d2c534f4d156c Mon Sep 17 00:00:00 2001 From: Trevor Ing Date: Wed, 8 May 2024 11:26:50 -0400 Subject: [PATCH] fix: small nit fixes --- packages/odyssey-react-mui/src/labs/Grid.tsx | 9 +-- .../odyssey-labs/Grid/Grid.stories.tsx | 80 +++++++++---------- .../OdysseyLayout/OdysseyLayout.stories.tsx | 22 ++--- 3 files changed, 55 insertions(+), 56 deletions(-) diff --git a/packages/odyssey-react-mui/src/labs/Grid.tsx b/packages/odyssey-react-mui/src/labs/Grid.tsx index 89787e450a..1100ba7ea5 100644 --- a/packages/odyssey-react-mui/src/labs/Grid.tsx +++ b/packages/odyssey-react-mui/src/labs/Grid.tsx @@ -25,15 +25,12 @@ type SupportedPaneRatios = | [1, 3] | [3, 1] | [1, 1, 1] - | [1, 2, 1] - | [2, 1, 1] - | [1, 1, 2] | [1, 1, 1, 1]; export type GridProps = { /** * The supported pane ratios for the Grid. Each number is a fractional unit that is mapped to the 'fr' CSS unit. - * e.g. [2, 1] defines a 2/3, 1/3 layout and [1, 2, 1] defines a 1/4, 1/2, 1/4 layout + * e.g. [2, 1] defines a 2/3, 1/3 layout and [1, 1, 1] defines a 1/3, 1/3, 1/3 layout * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Basic_concepts_of_grid_layout#the_fr_unit */ panes: SupportedPaneRatios; @@ -81,9 +78,7 @@ const Grid = ({ panes, children }: GridProps) => { odysseyDesignTokens={odysseyDesignTokens} panes={mappedPanes} > - {Children.toArray(children).map((child, index) => ( -
{child}
- ))} + {Children.toArray(children).map((child) => child)} ); diff --git a/packages/odyssey-storybook/src/components/odyssey-labs/Grid/Grid.stories.tsx b/packages/odyssey-storybook/src/components/odyssey-labs/Grid/Grid.stories.tsx index 8c4ba7a4f5..00689a4108 100644 --- a/packages/odyssey-storybook/src/components/odyssey-labs/Grid/Grid.stories.tsx +++ b/packages/odyssey-storybook/src/components/odyssey-labs/Grid/Grid.stories.tsx @@ -23,10 +23,10 @@ const storybookMeta: Meta = { panes: { control: "text", description: - "The title of the layout to be situated in the layout header", + "The supported pane ratios for the Grid. Each number is a fractional unit that is mapped to the 'fr' CSS unit. For example: [2, 1] defines a 2/3, 1/3 layout and [1, 1, 1] defines a 1/3, 1/3, 1/3 layout", table: { type: { - summary: "string", + summary: "SupportedPaneRatios", }, }, }, @@ -63,7 +63,7 @@ export const Single: StoryObj = { return ( -

Column

+

Pane

); @@ -78,10 +78,10 @@ export const Split: StoryObj = { return ( -

Column

+

Pane

-

Column

+

Pane

); @@ -96,10 +96,10 @@ export const TwoThirdsStart: StoryObj = { return ( -

Column

+

Pane

-

Column

+

Pane

); @@ -114,10 +114,10 @@ export const TwoThirdsEnd: StoryObj = { return ( -

Column

+

Pane

-

Column

+

Pane

); @@ -132,10 +132,10 @@ export const ThreeFourthsStart: StoryObj = { return ( -

Column

+

Pane

-

Column

+

Pane

); @@ -150,17 +150,17 @@ export const ThreeFourthsEnd: StoryObj = { return ( -

Column

+

Pane

-

Column

+

Pane

); }, }; -export const ThreeColumnSplit: StoryObj = { +export const ThreePaneSplit: StoryObj = { args: { panes: [1, 1, 1], }, @@ -168,20 +168,20 @@ export const ThreeColumnSplit: StoryObj = { return ( -

Column

+

Pane

-

Column

+

Pane

-

Column

+

Pane

); }, }; -export const FourColumnSplit: StoryObj = { +export const FourPaneSplit: StoryObj = { args: { panes: [1, 1, 1, 1], }, @@ -189,16 +189,16 @@ export const FourColumnSplit: StoryObj = { return ( -

Column

+

Pane

-

Column

+

Pane

-

Column

+

Pane

-

Column

+

Pane

); @@ -211,72 +211,72 @@ export const KitchenSink: StoryObj = { <> -

Column

+

Pane

-

Column

+

Pane

-

Column

+

Pane

-

Column

+

Pane

-

Column

+

Pane

-

Column

+

Pane

-

Column

+

Pane

-

Column

+

Pane

-

Column

+

Pane

-

Column

+

Pane

-

Column

+

Pane

-

Column

+

Pane

-

Column

+

Pane

-

Column

+

Pane

-

Column

+

Pane

-

Column

+

Pane

-

Column

+

Pane

-

Column

+

Pane

diff --git a/packages/odyssey-storybook/src/components/odyssey-labs/OdysseyLayout/OdysseyLayout.stories.tsx b/packages/odyssey-storybook/src/components/odyssey-labs/OdysseyLayout/OdysseyLayout.stories.tsx index 5c26ea5a44..14dd6ac60f 100644 --- a/packages/odyssey-storybook/src/components/odyssey-labs/OdysseyLayout/OdysseyLayout.stories.tsx +++ b/packages/odyssey-storybook/src/components/odyssey-labs/OdysseyLayout/OdysseyLayout.stories.tsx @@ -522,9 +522,10 @@ export const Dashboard: StoryObj = { marginTop: odysseyDesignTokens.Spacing4, }} > - {organizationData.map((data) => { + {organizationData.map((data, index) => { return ( = { For troubleshooting purposes, you can let Okta Support login to your account as an administrator. - {endUserData.map((data) => { + {endUserData.map((data, index) => { return ( = { isFullWidth={args.isFullWidth} > - + + + );