Package Exports
- gosu-dropdown
- gosu-dropdown/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gosu-dropdown) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
React Dropdown
Gosu React Dropdown is a simple React dropdown component
Installation
If you're using npm, in the command prompt run:
npm install gosu-dropdown --saveIf you're using yarn, run:
yarn add gosu-dropdownUsage
To use the component, first import Dropdown into your file:
import Dropdown from "gosu-dropdown";const options = [
{ key: '1', value: <div>๐บ๐ธ English</div>, label: <div>๐บ๐ธ</div> },
{ key: '2', value: <div>๐ต๐ฑ Polski</div>, label: <div>๐ต๐ฑ</div> },
{ key: '3', value: <div>๐บ๐ฆ ะฃะบัะฐัะฝััะบะพั</div>, label: <div>๐บ๐ฆ</div> },
]
<Dropdown
defaultSelectedKey="1"
listPlacement="bottomRight"
options={options} />Props
| Property | Type | Default | Description |
|---|---|---|---|
options |
Array |
[] |
{key: string, value: string, label?: string } |
onChange |
function |
undefined |
|
listPlacement |
string |
bottomCenter |
bottomCenter, bottomLeft, bottomRight |
caretColor |
styles |
undefined |
#000 |
placeholder |
styles |
undefined |
'Select option' |
defaultSelectedKey |
number |
string |
Any key from options |