-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3246 from mi6/cherry-pick-storybook-docs
Cherry pick storybook docs
- Loading branch information
Showing
126 changed files
with
554 additions
and
7,551 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,108 +1,13 @@ | ||
import { useState, useRef } from "react"; | ||
import { | ||
Meta, | ||
Story, | ||
Canvas, | ||
Controls, | ||
Description, | ||
Stories, | ||
Markdown | ||
} from "@storybook/blocks"; | ||
import { | ||
IcAccordion, | ||
IcAccordionGroup, | ||
IcSelect, | ||
IcTooltip, | ||
IcPopoverMenu, | ||
IcMenuItem, | ||
IcMenuGroup, | ||
IcButton, | ||
IcDialog, | ||
IcSearchBar, | ||
IcTypography, | ||
} from "../components"; | ||
import readme from "../../../web-components/src/components/ic-accordion/readme.md"; | ||
import * as IcAccordionStories from './ic-accordion.stories'; | ||
|
||
<Meta of={IcAccordionStories} /> | ||
|
||
<Description markdown={readme} /> | ||
|
||
### Default | ||
|
||
<Canvas> | ||
<Story of={IcAccordionStories.Default} /> | ||
</Canvas> | ||
|
||
### Expanded | ||
|
||
<Canvas> | ||
<Story of={IcAccordionStories.Expanded} /> | ||
</Canvas> | ||
|
||
### Icon | ||
|
||
<Canvas> | ||
<Story of={IcAccordionStories.Icon} /> | ||
</Canvas> | ||
|
||
### Group Title | ||
|
||
<Canvas> | ||
<Story of={IcAccordionStories.GroupTitle} /> | ||
</Canvas> | ||
|
||
### Sizes | ||
|
||
<Canvas> | ||
<Story of={IcAccordionStories.Sizes} /> | ||
</Canvas> | ||
|
||
### Single expansion | ||
|
||
<Canvas> | ||
<Story of={IcAccordionStories.SingleExpansion} /> | ||
</Canvas> | ||
|
||
### Parent | ||
|
||
<Canvas> | ||
<Story of={IcAccordionStories.Parent} /> | ||
</Canvas> | ||
|
||
### Disabled | ||
|
||
<Canvas> | ||
<Story of={IcAccordionStories.Disabled} /> | ||
</Canvas> | ||
|
||
### With Popover content | ||
|
||
<Canvas> | ||
<Story of={IcAccordionStories.WithPopoverContent} /> | ||
</Canvas> | ||
|
||
### Slotted headings | ||
|
||
<Canvas> | ||
<Story of={IcAccordionStories.SlottedHeadings} /> | ||
</Canvas> | ||
|
||
### Playground | ||
|
||
export const defaultArgs = { | ||
accessibleButtonLabel: "accordions", | ||
expanded: false, | ||
label: "Accordion group", | ||
singleExpansion: false, | ||
size: "medium", | ||
disabled: false, | ||
heading: "Accordion 1", | ||
message: "This is an example of the main body text.", | ||
theme: "inherit", | ||
expandedAccordion: false, | ||
sizeAccordion: "medium", | ||
themeAccordion: "inherit", | ||
}; | ||
<Markdown>{readme}</Markdown> | ||
|
||
<Canvas> | ||
<Story of={IcAccordionStories.Playground} /> | ||
</Canvas> | ||
<Stories /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,99 +1,13 @@ | ||
import { | ||
Meta, | ||
Story, | ||
Canvas, | ||
Controls, | ||
Description, | ||
Stories, | ||
Markdown | ||
} from "@storybook/blocks"; | ||
import { IcAlert, IcLink, IcButton } from "../components"; | ||
import readme from "../../../web-components/src/components/ic-alert/readme.md"; | ||
import { SlottedSVG } from "../react-component-lib/slottedSVG"; | ||
import * as IcAlertStories from './ic-alert.stories'; | ||
|
||
<Meta of={IcAlertStories} /> | ||
|
||
<Description markdown={readme} /> | ||
<Markdown>{readme}</Markdown> | ||
|
||
export const defaultArgs = { | ||
dismissible: false, | ||
heading: "Heading", | ||
message: "Message", | ||
titleAbove: false, | ||
variant: "neutral", | ||
showAction: false, | ||
showDefaultIcon: true, | ||
showSlottedIcon: false, | ||
theme: "inherit", | ||
}; | ||
|
||
### Variants | ||
|
||
<Canvas> | ||
<Story of={IcAlertStories.Variants} /> | ||
</Canvas> | ||
|
||
### Message only | ||
|
||
<Canvas> | ||
<Story of={IcAlertStories.MessageOnly} /> | ||
</Canvas> | ||
|
||
### Dismissible | ||
|
||
<Canvas> | ||
<Story of={IcAlertStories.Dismissible} /> | ||
</Canvas> | ||
|
||
### With action | ||
|
||
<Canvas> | ||
<Story of={IcAlertStories.WithAction} /> | ||
</Canvas> | ||
|
||
### Dismissible with action | ||
|
||
<Canvas> | ||
<Story of={IcAlertStories.DismissibleWithAction} /> | ||
</Canvas> | ||
|
||
### Title above | ||
|
||
<Canvas> | ||
<Story of={IcAlertStories.TitleAbove} /> | ||
</Canvas> | ||
|
||
### Responsive title | ||
|
||
<Canvas> | ||
<Story of={IcAlertStories.ResponsiveTitle} /> | ||
</Canvas> | ||
|
||
### Custom message | ||
|
||
<Canvas> | ||
<Story of={IcAlertStories.CustomMessage} /> | ||
</Canvas> | ||
|
||
### Custom message and title above | ||
|
||
<Canvas> | ||
<Story of={IcAlertStories.CustomMessageAndTitleAbove} /> | ||
</Canvas> | ||
|
||
### Slotted icon | ||
|
||
<Canvas> | ||
<Story of={IcAlertStories.SlottedIcon} /> | ||
</Canvas> | ||
|
||
### No icon | ||
|
||
<Canvas> | ||
<Story of={IcAlertStories.NoIcon} /> | ||
</Canvas> | ||
|
||
### Playground | ||
|
||
<Canvas> | ||
<Story of={IcAlertStories.Playground} /> | ||
</Canvas> | ||
<Stories /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.