How to use the reason-react/src/ReactDOMRe.js.createElementVariadic 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 reason-association / reasonml.org / components / CodeSignature.bs.js View on Github external
function CodeSignature(Props) {
  var code = Props.code;
  var lang = Props.lang;
  var highlighted = Highlight.highlight(lang, code).value;
  return ReactDOMRe.createElementVariadic("code", {
              className: "text-lg font-bold md:texxt-xl whitespace-pre-line text-night-dark hljs sig lang-" + lang,
              dangerouslySetInnerHTML: {
                __html: highlighted
              }
            }, /* array */[]);
}
github reason-association / reasonml.org / components / CodeExample.bs.js View on Github external
function CodeExample(Props) {
  var code = Props.code;
  var lang = Props.lang;
  var highlighted = Highlight.highlight(lang, code).value;
  var children = ReactDOMRe.createElementVariadic("code", {
        className: "wrap hljs lang-" + lang,
        dangerouslySetInnerHTML: {
          __html: highlighted
        }
      }, /* array */[]);
  return React.createElement("div", {
              className: "flex flex-col -mx-8 xs:mx-0 rounded-none xs:rounded-lg bg-night-dark py-3 px-3 mt-10 text-snow-dark"
            }, React.createElement("div", {
                  className: "font-montserrat text-sm mb-3 font-bold text-fire"
                }, Util.ReactStuff.s(lang.toUpperCase())), React.createElement("div", {
                  className: "pl-5 text-base pb-4 overflow-x-auto"
                }, children));
}