mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-16 05:03:11 +08:00
fixes for issue 14218
This commit is contained in:
parent
7472450a83
commit
f06074924c
@ -62,12 +62,12 @@ If you're coming from the `storiesOf` format, there's [a codemod that adds it fo
|
||||
Sometimes it's useful to document multiple components on the same page. For example, suppose your component library contains `List` and `ListItem` components that don't make sense without one another. `DocsPage` has the concept of a "primary" component with the [`component` parameter](#component-parameter), and can also accept one or more "subcomponents":
|
||||
|
||||
```js
|
||||
import { List, ListHeading, ListItem } from './List';
|
||||
import { Button, ButtonGroup } from '../ButtonGroup';
|
||||
|
||||
export default {
|
||||
title: 'Path/to/List',
|
||||
component: List,
|
||||
subcomponents: { ListHeading, ListItem },
|
||||
title: 'Path/to/ButtonGroup',
|
||||
component: ButtonGroup,
|
||||
subcomponents: { Button },
|
||||
};
|
||||
```
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 71 KiB |
@ -40,7 +40,7 @@ with unique URLs, which is great for review and testing.
|
||||
|
||||
<Canvas>
|
||||
<Story name="warning" args={{
|
||||
status: warning,
|
||||
status: 'warning',
|
||||
label: 'Warning'
|
||||
}}>
|
||||
{Template.bind({})}
|
||||
@ -58,7 +58,7 @@ with unique URLs, which is great for review and testing.
|
||||
{Template.bind({})}
|
||||
</Story>
|
||||
<Story name="with icon" args={{
|
||||
status: warning,
|
||||
status: 'warning',
|
||||
label: (<Icon icon="check" inline /> with icon)
|
||||
)}}>
|
||||
{Template.bind({})}
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 71 KiB |
Loading…
x
Reference in New Issue
Block a user