This is Bucklescript bindings for react-dropdown.
Install, npm
npm install --save bs-react-dropdown
Add bs-react-dropdown to bs-depenencies
in your bsconfig.json
!
{
/* ... */
"bs-dependencies": [
"bs-react-dropdown"
],
/* ... */
}
type dropdownOption = {
label: string,
value: string,
className: option(string),
};
open Dropdown;
let component = ReasonReact.statelessComponent(__MODULE__);
let options: dropdownOptions = [|
{label: "label1", value: "value1", className: Some("class1")},
{label: "label2", value: "value2", className: Some("class2")},
|];
let make = _children => {
...component,
render: self => {
<Dropdown options />;
},
};
Check reducer component example