warning_amberDeprecated
The Dropdown component is deprecated and will be no longer be supported.
You can use DropdownV2 instead.
For use with DropdownMenu
or Dropdown
components
Usage
Import
import { DropdownButton } from '@passfort/castle'
Example
function Example() {
return (
<DropdownMenu
contentStyles={{ w: 400 }}
title="Select one"
items={selectUsers}
>
<DropdownButton label={'Label'} />
</DropdownMenu>
)
}
live example
Arrow
Toggle the arrow using showArrow
prop
function Example() {
return (
<DropdownMenu
contentStyles={{ w: 400 }}
title="Select one"
items={selectUsers}
>
<DropdownButton showArrow={false} label={'No Arrow'} />
</DropdownMenu>
)
}
live example
Suffix
Add an optional suffix using suffix
prop
function Example() {
return (
<DropdownMenu
contentStyles={{ w: 400 }}
title="Select one"
items={selectUsers}
>
<DropdownButton suffix="(100)" label={'Filter'} />
</DropdownMenu>
)
}
live example