Skip to content

Commit

Permalink
chore: Fix options for text size examples of lists (#1579)
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentSmedinga authored Sep 12, 2024
1 parent 1f29f35 commit 879ce29
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
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

0 comments on commit 879ce29

Please sign in to comment.