UNPKG

bs-spectacle

Version:
37 lines (32 loc) 959 B
// Generated by BUCKLESCRIPT VERSION 2.2.2, PLEASE EDIT WITH CARE 'use strict'; var Js_option = require("bs-platform/lib/js/js_option.js"); var Spectacle = require("spectacle"); var ReasonReact = require("reason-react/src/ReasonReact.js"); function componentPlaygroundThemeToJs(theme) { if (theme !== 0) { return "dark"; } else { return "light"; } } function make(code, previewBackgroundColor, theme, scope, children) { var tmp = { }; if (code) { tmp.code = code[0]; } if (previewBackgroundColor) { tmp.previewBackgroundColor = previewBackgroundColor[0]; } var tmp$1 = Js_option.map(componentPlaygroundThemeToJs, theme); if (tmp$1) { tmp.theme = tmp$1[0]; } if (scope) { tmp.scope = scope[0]; } return ReasonReact.wrapJsForReason(Spectacle.ComponentPlayground, tmp, children); } exports.componentPlaygroundThemeToJs = componentPlaygroundThemeToJs; exports.make = make; /* spectacle Not a pure module */