triggers a callback when you click outside of an element
const [const isOpen: boolean
isOpen, const setIsOpen: (value: Kaioken.StateSetter<boolean>) => void
setIsOpen] = useState<boolean>(initial: boolean | (() => boolean)): readonly [boolean, (value: Kaioken.StateSetter<boolean>) => void]
useState(false)
const const ref: Kaioken.MutableRefObject<HTMLElement | null>
ref = useRef<HTMLElement | null>(initialValue: HTMLElement | null): Kaioken.MutableRefObject<HTMLElement | null> (+2 overloads)
useRef<HTMLElement | null>(null)
useClickOutside<ClickOutsideOptions>(ref: Kaioken.MutableRefObject<Element | null>, handler: ClickOutsideHandler<{
detectIframe: boolean | undefined;
}>, options?: ClickOutsideOptions | undefined): void
useClickOutside(const ref: Kaioken.MutableRefObject<HTMLElement | null>
ref, () => {
const setIsOpen: (value: Kaioken.StateSetter<boolean>) => void
setIsOpen(false)
})