UNPKG

@light-sheet/react

Version:

FortuneSheet is a drop-in javascript spreadsheet library that provides rich features like Excel and Google Sheets

15 lines 564 B
import React, { useRef } from "react"; import { useOutsideClick } from "../../hooks/useOutsideClick"; var MoreItemsContaier = function MoreItemsContaier(_ref) { var onClose = _ref.onClose, children = _ref.children; var containerRef = useRef(null); useOutsideClick(containerRef, function () { onClose === null || onClose === void 0 || onClose(); }, [containerRef, onClose]); return /*#__PURE__*/React.createElement("div", { ref: containerRef, className: "fortune-toolbar-more-container" }, children); }; export default MoreItemsContaier;