Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

496 B
Raw Blame
import React from "react";
import ClickAwayHandler from "./ClickAwayHandler";

type Props = {
  children: React.ReactNode;
  onClose: Function;
  className?: string;
  style?: React.CSSProperties;
};

const Popover = ({ children, className, onClose, style }: Props) => {
  return (
    <ClickAwayHandler
      onClickOutside={() => onClose()}
      className={`absolute z-50 ${className || ""}`}
      style={style}
    >
      {children}
    </ClickAwayHandler>
  );
};

export default Popover;