Skip to content

ixzzd/bs-react-dropdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is Bucklescript bindings for react-dropdown.

Install, npm

npm install --save bs-react-dropdown

Setup

Add bs-react-dropdown to bs-depenencies in your bsconfig.json!

{
  /* ... */
  "bs-dependencies": [
    "bs-react-dropdown"
  ],
  /* ... */
}

Dropdown option type

type dropdownOption = {
  label: string,
  value: string,
  className: option(string),
};

Basic usage

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

Releases

No releases published

Packages

No packages published

Languages