Last active
April 3, 2019 04:51
-
-
Save abenoit/1f66d67970fcdda0c2b06a7d76ab2484 to your computer and use it in GitHub Desktop.
ReasonML Binding for react-click-outside
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[@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