modify operations in app list

This commit is contained in:
JzoNg
2024-03-19 15:26:58 +08:00
parent 0c100ac0b1
commit 1532564601
3 changed files with 62 additions and 92 deletions

View File

@ -17,7 +17,6 @@ type IPopover = {
btnElement?: string | React.ReactNode
btnClassName?: string | ((open: boolean) => string)
manualClose?: boolean
onTriggerClick?: () => void
}
const timeoutDuration = 100
@ -31,7 +30,6 @@ export default function CustomPopover({
className,
btnClassName,
manualClose,
onTriggerClick,
}: IPopover) {
const buttonRef = useRef<HTMLButtonElement>(null)
const timeOutRef = useRef<NodeJS.Timeout | null>(null)
@ -68,10 +66,6 @@ export default function CustomPopover({
? btnClassName
: btnClassName?.(open)
}`}
onClick={() => {
if (!open)
onTriggerClick && onTriggerClick()
}}
>
{btnElement}
</Popover.Button>