feat: eye dropper (#6615)
This commit is contained in:
@ -1,11 +1,10 @@
|
||||
import { useOutsideClick } from "../../hooks/useOutsideClick";
|
||||
import { Island } from "../Island";
|
||||
|
||||
import { useDevice } from "../App";
|
||||
import clsx from "clsx";
|
||||
import Stack from "../Stack";
|
||||
import React from "react";
|
||||
import React, { useRef } from "react";
|
||||
import { DropdownMenuContentPropsContext } from "./common";
|
||||
import { useOutsideClick } from "../../hooks/useOutsideClick";
|
||||
|
||||
const MenuContent = ({
|
||||
children,
|
||||
@ -24,7 +23,9 @@ const MenuContent = ({
|
||||
style?: React.CSSProperties;
|
||||
}) => {
|
||||
const device = useDevice();
|
||||
const menuRef = useOutsideClick(() => {
|
||||
const menuRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
useOutsideClick(menuRef, () => {
|
||||
onClickOutside?.();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user