patchkit-dropdown-selector

1.0.0 • Public • Published

Dropdown Selector

Dropdown button that behaves like a <select> element.

screenshot.png

import DropdownSelectorBtn from 'patchkit-dropdown-selector'
 
const onSelect = o => console.log('selected', o)
 
const ITEMS = [
  { label: 'one', value: 1 },
  { label: 'two', value: 2 },
  { label: 'three', value: 3 }
]
<DropdownSelectorBtn className="btn highlighted" items={ITEMS} label="Current" initValue={1} onSelect={onSelect} />

Styles

Use the .less file from patchkit-dropdown:

@import "node_modules/patchkit-dropdown/styles.less"

Readme

Keywords

Package Sidebar

Install

npm i patchkit-dropdown-selector

Weekly Downloads

0

Version

1.0.0

License

GPL-3.0

Last publish

Collaborators

  • cel
  • pfraze