Skip to content

Commit

Permalink
add icons to dropdown docs
Browse files Browse the repository at this point in the history
  • Loading branch information
storywithoutend committed Sep 4, 2023
1 parent 994a98d commit fd143b0
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions docs/src/reference/mdx/molecules/Dropdown.docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ import { Dropdown } from '@ensdomains/thorin'
raw: 'boolean | Colors',
},
},
icon: {
name: 'icon',
description: 'An icon that leads the label.',
type: {
raw: 'ReactNode'
}
}

}}
/>

Expand Down Expand Up @@ -266,3 +274,25 @@ import { Dropdown } from '@ensdomains/thorin'
label="Custom"
/>
```

## Items with icons

```tsx live=true minHeight=300px
<Dropdown
items={[
{
label: 'None',
onClick: () => null,
color: 'text',
icon: <DotGridSVG />,
},
{
label: 'Default',
onClick: () => null,
color: 'text',
icon: <CogSVG />,
},
]}
label="Custom"
/>
```

0 comments on commit fd143b0

Please sign in to comment.