bs-spectacle
Version:
Spectacle bindings for Bucklescript
50 lines (46 loc) • 1.42 kB
JavaScript
// Generated by BUCKLESCRIPT VERSION 2.2.2, PLEASE EDIT WITH CARE
;
var Js_option = require("bs-platform/lib/js/js_option.js");
var Spectacle = require("spectacle");
var ReasonReact = require("reason-react/src/ReasonReact.js");
var Types$BsSpectacle = require("../Types.js");
function make(controls, contentHeight, contentWidth, history, progress, theme, transition, transitionDuration, autoplay, autoplayDuration, children) {
var tmp = { };
var tmp$1 = Types$BsSpectacle.to_js_boolean(controls);
if (tmp$1) {
tmp.controls = tmp$1[0];
}
if (contentHeight) {
tmp.contentHeight = contentHeight[0];
}
if (contentWidth) {
tmp.contentWidth = contentWidth[0];
}
if (history) {
tmp.history = history[0];
}
var tmp$2 = Js_option.map(Types$BsSpectacle.mapProgressToJs, progress);
if (tmp$2) {
tmp.progress = tmp$2[0];
}
if (theme) {
tmp.theme = theme[0];
}
var tmp$3 = Types$BsSpectacle.mapTransitionsToJs(transition);
if (tmp$3) {
tmp.transition = tmp$3[0];
}
if (transitionDuration) {
tmp.transitionDuration = transitionDuration[0];
}
var tmp$4 = Types$BsSpectacle.to_js_boolean(autoplay);
if (tmp$4) {
tmp.autoplay = tmp$4[0];
}
if (autoplayDuration) {
tmp.autoplayDuration = autoplayDuration[0];
}
return ReasonReact.wrapJsForReason(Spectacle.Deck, tmp, children);
}
exports.make = make;
/* spectacle Not a pure module */