-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* π Rename to .tsx * π Update story with args table, ts and 6.0 storybook api * π Remove displayName
- Loading branch information
Showing
5 changed files
with
83 additions
and
72 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import React from 'react' | ||
import { List, ListProps } from '@equinor/eds-core-react' | ||
import { Meta, Story } from '@storybook/react' | ||
|
||
const { ListItem } = List | ||
|
||
const start = '15' | ||
|
||
export default { | ||
title: 'Components/Lists', | ||
component: List, | ||
} as Meta | ||
|
||
export const Default: Story<ListProps> = (args) => ( | ||
<List {...args}> | ||
<ListItem>List item</ListItem> | ||
<ListItem>List item</ListItem> | ||
<ListItem> | ||
List item | ||
<List {...args}> | ||
<ListItem>List item</ListItem> | ||
<ListItem>List item</ListItem> | ||
<ListItem>List item</ListItem> | ||
</List> | ||
</ListItem> | ||
</List> | ||
) | ||
|
||
export const Unordered: Story<ListProps> = () => ( | ||
<List variant="bullet"> | ||
<ListItem>List item</ListItem> | ||
<ListItem>List item</ListItem> | ||
<ListItem> | ||
List item | ||
<List> | ||
<ListItem>List item</ListItem> | ||
<ListItem>List item</ListItem> | ||
<ListItem>List item</ListItem> | ||
</List> | ||
</ListItem> | ||
</List> | ||
) | ||
|
||
export const Ordered: Story<ListProps> = () => ( | ||
<List variant="numbered"> | ||
<ListItem>List item</ListItem> | ||
<ListItem> | ||
List item | ||
<List variant="numbered"> | ||
<ListItem>List item</ListItem> | ||
<ListItem>List item</ListItem> | ||
<ListItem> | ||
List item | ||
<List variant="numbered"> | ||
<ListItem>List item</ListItem> | ||
<ListItem>List item</ListItem> | ||
<ListItem>List item</ListItem> | ||
</List> | ||
</ListItem> | ||
</List> | ||
</ListItem> | ||
<ListItem>List item</ListItem> | ||
</List> | ||
) | ||
|
||
export const OrderedStartingOn15: Story<ListProps> = () => ( | ||
<List variant="numbered" start={start}> | ||
<ListItem>List item</ListItem> | ||
<ListItem>List item</ListItem> | ||
<ListItem>List item</ListItem> | ||
<ListItem>List item</ListItem> | ||
<ListItem>List item</ListItem> | ||
<ListItem>List item</ListItem> | ||
<ListItem>List item</ListItem> | ||
<ListItem>List item</ListItem> | ||
</List> | ||
) |
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,12 +1,12 @@ | ||
import { List as BaseComponent } from './List' | ||
import { ListItem } from './ListItem' | ||
|
||
type ListTypes = typeof BaseComponent & { | ||
type ListProps = typeof BaseComponent & { | ||
ListItem: typeof ListItem | ||
} | ||
|
||
const List = BaseComponent as ListTypes | ||
const List = BaseComponent as ListProps | ||
|
||
List.ListItem = ListItem | ||
|
||
export { List } | ||
export { List, ListProps } |
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