import { useBoolean, useClickAway } from 'ahooks'; import type { ButtonHTMLAttributes, FC } from 'react'; import { forwardRef, useEffect, useRef } from 'react'; import { SketchPicker } from 'react-color'; interface Props { color: string; onChange: (input: string) => void; } let globalZIndex = 10; const ColorButton = forwardRef & ButtonHTMLAttributes>( ({ color, ...props }, ref) => { return (