This is Bucklescript bindings for react-trello.
yarn add bs-react-trello
Add bs-react-trello to bs-depenencies
in your bsconfig.json
!
{
/* ... */
"bs-dependencies": [
"bs-react-trello"
],
/* ... */
}
let data = [|
ReactTrello.Lane.t(
~id="title1",
~label="title1 label",
~addCardLink=React.string("title 1 addCardLink"),
~cards=[|
ReactTrello.Card.t(
~id="t1 card1",
~title="t1 title1",
~description="t1 description",
(),
),
ReactTrello.Card.t(
~id="t2 card1",
~title="t2 title1",
~description="t2 description",
(),
),
|],
(),
),
ReactTrello.Lane.t(
~id="title2",
~label="title2 label",
~addCardLink=React.string("title 2 addCardLink"),
~cards=[||],
(),
),
|];
[@react.component]
let make = () =>
<div className="container"> <ReactTrello data={"lanes": data} /> </div>;
let data =
[|(ReactTrello.Lane.t ~id:"title1" ~label:"title1 label"
~addCardLink:(React.string "title 1 addCardLink")
~cards:[|(ReactTrello.Card.t ~id:"t1 card1" ~title:"t1 title1"
~description:"t1 description" ());(ReactTrello.Card.t
~id:"t2 card1"
~title:"t2 title1"
~description:"t2 description"
())|] ());(ReactTrello.Lane.t
~id:"title2"
~label:"title2 label"
~addCardLink:(
React.string
"title 2 addCardLink")
~cards:
[||] ())|]
let make () =
((div ~className:"container"
~children:[((ReactTrello.createElement
~data:([%bs.obj { lanes = data }]) ~children:[] ())
[@JSX ])] ())[@JSX ])[@@react.component ]