Skip to content

Commit

Permalink
docs(contained-list): improve stories (#12347)
Browse files Browse the repository at this point in the history
* docs(contained-list): rename stories

* docs(contained-list): add "With Layer" story
  • Loading branch information
janhassel committed Oct 21, 2022
1 parent 4d94763 commit 74dff48
Showing 1 changed file with 54 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
import { VStack } from '../../Stack';
import Button from '../../Button';
import ExpandableSearch from '../../ExpandableSearch';
import { Layer } from '../../Layer';
import Tag from '../../Tag';
import { Tooltip } from '../../Tooltip/next';

Expand All @@ -29,7 +30,7 @@ export default {
component: ContainedList,
};

export const OnPage = () => (
export const Default = () => (
<>
<ContainedList label="List title" kind="on-page">
<ContainedListItem>List item</ContainedListItem>
Expand Down Expand Up @@ -63,7 +64,7 @@ export const Disclosed = () => (
</>
);

export const Interactive = () => {
export const WithInteractiveItems = () => {
const onClick = action('onClick (ContainedListItem)');

return (
Expand All @@ -88,7 +89,7 @@ export const Interactive = () => {
);
};

export const Actions = () => {
export const WithActions = () => {
const itemAction = (
<Button
kind="ghost"
Expand Down Expand Up @@ -128,7 +129,7 @@ export const Actions = () => {
);
};

export const ActionsInteractive = () => {
export const WithInteractiveItemsAndActions = () => {
const onClick = action('onClick (ContainedListItem)');
const itemAction = (
<Button
Expand Down Expand Up @@ -183,7 +184,7 @@ export const ActionsInteractive = () => {
);
};

export const ListTitleDecorators = () => {
export const WithListTitleDecorators = () => {
return (
<VStack gap={12}>
<ContainedList
Expand Down Expand Up @@ -228,7 +229,7 @@ export const ListTitleDecorators = () => {
);
};

export const Icons = () => {
export const WithIcons = () => {
return (
<VStack gap={12}>
<ContainedList label="List title" kind="on-page">
Expand All @@ -247,6 +248,53 @@ export const Icons = () => {
);
};

export const WithLayer = () => {
return (
<VStack gap={12}>
<VStack gap={5}>
<ContainedList label="List title" kind="on-page">
<ContainedListItem>List item</ContainedListItem>
<ContainedListItem>List item</ContainedListItem>
</ContainedList>
<Layer>
<VStack gap={5}>
<ContainedList label="List title" kind="on-page">
<ContainedListItem>List item</ContainedListItem>
<ContainedListItem>List item</ContainedListItem>
</ContainedList>
<Layer>
<ContainedList label="List title" kind="on-page">
<ContainedListItem>List item</ContainedListItem>
<ContainedListItem>List item</ContainedListItem>
</ContainedList>
</Layer>
</VStack>
</Layer>
</VStack>
<VStack gap={5}>
<ContainedList label="List title" kind="disclosed">
<ContainedListItem>List item</ContainedListItem>
<ContainedListItem>List item</ContainedListItem>
</ContainedList>
<Layer>
<VStack gap={5}>
<ContainedList label="List title" kind="disclosed">
<ContainedListItem>List item</ContainedListItem>
<ContainedListItem>List item</ContainedListItem>
</ContainedList>
<Layer>
<ContainedList label="List title" kind="disclosed">
<ContainedListItem>List item</ContainedListItem>
<ContainedListItem>List item</ContainedListItem>
</ContainedList>
</Layer>
</VStack>
</Layer>
</VStack>
</VStack>
);
};

const PlaygroundStory = (args) => (
<>
{[...Array(4)].map((_, i) => (
Expand Down

0 comments on commit 74dff48

Please sign in to comment.