Skip to content

Commit

Permalink
docs(dropdown): state example became status example in doc for consis…
Browse files Browse the repository at this point in the history
…tancy
  • Loading branch information
Powerplex committed Dec 19, 2023
1 parent 0f0b774 commit e5fd9bd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions packages/components/dropdown/src/Dropdown.doc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ You can style this element directly, or you can use it as a wrapper to put an ic

<Canvas of={stories.ItemIndicator} />

### States
### Status

Use `state` prop to assign a specific state to the dropdown, choosing from: `error`, `alert` and `success`. By doing so, the outline styles will be updated, and a state indicator will be displayed accordingly.
Use `state` prop to assign a specific state to the dropdown, choosing from: `error`, `alert` and `success`. By doing so, the outline styles will be updated, and a status indicator will be displayed accordingly.

<Canvas of={stories.States} />
<Canvas of={stories.Statuses} />

### Read only

Expand Down
10 changes: 5 additions & 5 deletions packages/components/dropdown/src/Dropdown.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,16 +266,16 @@ export const ItemIndicator: StoryFn = _args => {
)
}

export const States: StoryFn = () => {
type State = ComponentProps<typeof Dropdown>['state']
export const Statuses: StoryFn = () => {
type Status = ComponentProps<typeof Dropdown>['state']

const states: State[] = ['error', 'alert', 'success']
const statuses: Status[] = ['error', 'alert', 'success']

return (
<div className="flex flex-col gap-lg pb-[300px]">
{states.map(state => {
{statuses.map(status => {
return (
<Dropdown state={state}>
<Dropdown state={status}>
<Dropdown.Trigger aria-label="Book">
<Dropdown.Value placeholder="Pick a book" />
</Dropdown.Trigger>
Expand Down

0 comments on commit e5fd9bd

Please sign in to comment.