How to use the reason-react/src/ReasonReact.js.wrapJsForReason function in reason-react

To help you get started, we’ve selected a few reason-react examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github phated / mxdbmobile / src / icon / MaterialCommunityIcon.js View on Github external
function make(name, _) {
  return ReasonReact.wrapJsForReason(MaterialCommunityIcons.default, {
              name: name,
              size: 24
            }, /* array */[]);
}
github phated / mxdbmobile / src / material / MaterialListItem.js View on Github external
function make(centerElement, leftElement, divider, _) {
  return ReasonReact.wrapJsForReason(ReactNativeMaterialUi.ListItem, {
              leftElement: leftElement,
              centerElement: centerElement,
              divider: divider,
              numberOfLines: 3
            }, /* array */[]);
}
github phated / mxdbmobile / src / material / MaterialToolbar.js View on Github external
function make(centerElement, search, _) {
  var searchableConfig = search ? /* Some */[{
        autoFocus: true,
        placeholder: "Search"
      }] : /* None */0;
  return ReasonReact.wrapJsForReason(ReactNativeMaterialUi.Toolbar, {
              centerElement: centerElement,
              searchable: Js_null_undefined.fromOption(searchableConfig)
            }, /* array */[]);
}
github phated / mxdbmobile / src / icon / Icon.js View on Github external
function make(name, style, onPress, $staropt$star, _) {
  var size = $staropt$star ? $staropt$star[0] : 24;
  var match = isCustom(name);
  var reactClass = match ? customIcon : MaterialIcons.default;
  return ReasonReact.wrapJsForReason(reactClass, {
              name: name,
              size: size,
              style: Js_null_undefined.fromOption(style),
              onPress: Js_null_undefined.fromOption(onPress)
            }, /* array */[]);
}
github rebench / rebench.github.io / src / common / ffi / components / CodeMirror.bs.js View on Github external
function make(style, value, defaultValue, editorDidMount, onChange, options, children) {
  return ReasonReact.wrapJsForReason(ReactCodemirror2.Controlled, {
              style: Js_undefined.fromOption(style),
              value: Js_undefined.fromOption(value),
              defaultValue: Js_undefined.fromOption(defaultValue),
              editorDidMount: Js_undefined.fromOption(editorDidMount),
              onBeforeChange: Rebase.Option[/* mapOr */18]((function (f, _, _$1, value) {
                      return Curry._1(f, value);
                    }), (function (_, _$1, _$2) {
                      return /* () */0;
                    }), onChange),
              options: Js_undefined.fromOption(options)
            }, children);
}
github voteamerica / voteamerica.github.io / webpack / components / ui / LeftPaddedButton.bs.js View on Github external
function make(props, className, id, onClick, children) {
  return ReasonReact.wrapJsForReason(LeftPaddedButtonJsx.default, Curry._3(props, className, id, onClick), children);
}
github Simon-Initiative / authoring-client / src / components / common / ToggleSwitch.bs.js View on Github external
function make(editMode, className, style, checked, onClick, label, children) {
  return ReasonReact.wrapJsForReason(ToggleSwitchTsx.ToggleSwitch, {
              className: Js_null_undefined.fromOption(className),
              editMode: Js_null_undefined.fromOption(editMode),
              style: Js_null_undefined.fromOption(style),
              checked: Js_null_undefined.fromOption(checked),
              onClick: onClick,
              label: label
            }, children);
}
github reasonml-old / reason-react-example / src / interop / MyBannerRe.bs.js View on Github external
function make(show, message, children) {
  return ReasonReact.wrapJsForReason(MyBanner, {
              show: show,
              message: message
            }, children);
}
github Sketch-sh / nit / src / vendor / Textarea.bs.js View on Github external
if (onChange) {
    tmp.onChange = Js_primitive.valFromOption(onChange);
  }
  if (onKeyDown) {
    tmp.onKeyDown = Js_primitive.valFromOption(onKeyDown);
  }
  if (autoFocus) {
    tmp.autoFocus = Js_primitive.valFromOption(autoFocus);
  }
  if (minRows) {
    tmp.minRows = Js_primitive.valFromOption(minRows);
  }
  if (maxRows) {
    tmp.maxRows = Js_primitive.valFromOption(maxRows);
  }
  return ReasonReact.wrapJsForReason(ReactTextareaAutosize.default, tmp, children);
}
github voteamerica / voteamerica.github.io / webpack / components / Table.bs.js View on Github external
function make(props, className, type_, defaultPageSize, page, pageSize, columns, data, onPageChange, onPageSizeChange, getTdProps, children) {
  return ReasonReact.wrapJsForReason(ReactTable.default, Curry.app(props, [
                  className,
                  type_,
                  columns,
                  defaultPageSize,
                  page,
                  pageSize,
                  data,
                  onPageChange,
                  onPageSizeChange,
                  getTdProps
                ]), children);
}