Skip to content

Instantly share code, notes, and snippets.

@abenoit
Last active Apr 3, 2019
Embed
What would you like to do?
ReasonML Binding for react-click-outside
[@bs.module "react-click-outside"]
external clickOutside: ReasonReact.reactClass = "default";
[@bs.deriving abstract]
type jsProps = {
className: option(string),
onClickOutside: ReactEvent.Mouse.t => unit,
};
let make = (~className=?, ~onClickOutside, children) =>
ReasonReact.wrapJsForReason(
~reactClass=clickOutside,
~props=jsProps(~className, ~onClickOutside),
children,
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment