Skip to content

Commit

Permalink
update storybook docs
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenjwatkins committed Oct 24, 2023
1 parent 6ed04e5 commit e0ea139
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions easy-ui-react/src/ProductLayout/ProductLayout.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ import * as ProductLayoutStories from "./ProductLayout.stories";

`ProductLayout` contains slots as props for the `sidebar`, `header`, and `content` areas.

_Example structure_:

```tsx
<ProductLayout
sidebar={
<ProductLayout.Sidebar>
<ProductNav />
<>{/* Product sidebar nav */}</>
</ProductLayout.Sidebar>
}
header={
Expand All @@ -35,6 +37,8 @@ import * as ProductLayoutStories from "./ProductLayout.stories";
Documentation
</Menu.Item>,
]}
// Optionally accept a menu handler for menu items that are not links
onHelpMenuAction={(key) => {}}
primaryAction={{
content: "CTA 1",
onAction: () => {},
Expand All @@ -49,7 +53,7 @@ import * as ProductLayoutStories from "./ProductLayout.stories";
}
content={
<ProductLayout.Content>
<div>Content</div>
<>{/* Content */}</>
</ProductLayout.Content>
}
/>
Expand All @@ -61,14 +65,15 @@ import * as ProductLayoutStories from "./ProductLayout.stories";

`ProductLayout.TabbedContent` uses a `TabNav` component under the hood. Tab items are expected to be links to subpages.

Tabs can be supplied to `ProductLayout.TabbedContent` through the `tabs` prop.
Tabs can be supplied to `ProductLayout.TabbedContent` through the `tabs` prop. `ProductLayout.TabbedContent` accepts an `aria-label` property to label the navigation.

```tsx
<ProductLayout
sidebar={/* ... */}
header={/* ... */}
content={
<ProductLayout.TabbedContent
aria-label="Account Settings"
tabs={[
<TabNav.Item
key="1"
Expand Down

0 comments on commit e0ea139

Please sign in to comment.