Navigator Prefabricating Marinates

    bs-reactour

    0.1.0 • Public • Published

    bs-reactour

    Build Status dependencies Status devDependencies Status peerDependencies Status Greenkeeper badge

    ReasonML bindings for reactour library. JSX 3 syntax only.

    Installation

    npm i --save bs-reactour reactour
    

    Then add bs-reactour as a dependency to bsconfig.json.

    Usage

    [@react.component]
    let make = () => {
      let (isOpen, setIsOpen) = React.useState(() => true);
      let handleClose =
        React.useCallback1(() => setIsOpen(_ => false), [|setIsOpen|]);
    
      <Reactour
        isOpen
        steps={Reactour.Steps.Step.[{
          selector: "#cta",
          content: `element(<>{"Click this!" |> React.string}</>),
          position: `right,
          action: _ => {
            Js.log("The first step entered!")
          },
          style: ReactDOMRe.Style.make(),
          stepInteraction: true,
          navDotAriaLabel: "",
        }, {
          selector: "#modal",
          content: `element(<>{"You made this thing to pop up!" |> React.string}</>),
          position: `left,
          action: _ => {
            Js.log("The second step entered!")
          },
          style: ReactDOMRe.Style.make(
            ~width="300px",
            ()
          ),
          stepInteraction: false,
          navDotAriaLabel: "",
        }]}
        onRequestClose=handleClose
      />;;
    };
    

    Install

    npm i bs-reactour

    DownloadsWeekly Downloads

    9

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    11 kB

    Total Files

    6

    Last publish

    Collaborators

    • erykpiast