0.0.1-alpha.1 • Published 2 years ago

@rendr-view/use-parallax-container v0.0.1-alpha.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

@rendr-view/use-outside-alerter

A React hook that can trigger a callback function when the user interacts with any content outside the target element.

Installation

yarn add @rendr-view/use-outside-alerter

Example usage

function Comp() {
  const ref = React.useRef();

  useOutsideAlerter(
    ref,
    () => {
      // the user has clicked outside the modal, you may want to close it
    },
  );

  return <div ref={ref} className="Modal">{...content}</div>
} 
0.0.1-alpha.1

2 years ago

0.0.1-alpha.0

2 years ago