Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fix options for text size examples of lists #1579

Merged
merged 3 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions storybook/src/components/OrderedList/OrderedList.docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ import README from "../../../../packages/css/src/components/ordered-list/README.

## Examples

### Small text

Use a list with a smaller font size in form descriptions and captions and the like.

<Canvas of={OrderedListStories.SmallText} />

### Two levels

A list may have one nested level.
Expand Down Expand Up @@ -61,3 +55,9 @@ This ensures the colour of the text provides enough contrast.
When nesting lists, set the prop on all lists.

<Canvas of={OrderedListStories.InverseColor} />

### Small text

Use a list with a smaller font size in form descriptions and captions and the like.

<Canvas of={OrderedListStories.SmallText} />
14 changes: 7 additions & 7 deletions storybook/src/components/OrderedList/OrderedList.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const meta = {
type: 'radio',
labels: { small: 'small', undefined: 'medium' },
},
options: ['small', undefined, 'large'],
options: ['small', undefined],
},
},
decorators: [inverseColorDecorator],
Expand All @@ -49,12 +49,6 @@ type Story = StoryObj<typeof meta>

export const Default: Story = {}

export const SmallText: Story = {
args: {
size: 'small',
},
}

export const TwoLevels: Story = {
render: (args) => (
<OrderedList {...args}>
Expand Down Expand Up @@ -151,3 +145,9 @@ export const InverseColor: Story = {
</OrderedList>
),
}

export const SmallText: Story = {
args: {
size: 'small',
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ const meta = {
inverseColor: false,
markers: undefined,
},
argTypes: {
size: {
control: {
type: 'radio',
labels: { small: 'small', undefined: 'medium' },
},
options: ['small', undefined],
},
},
decorators: [inverseColorDecorator],
} satisfies Meta<typeof UnorderedList>

Expand Down