UNPKG

@fluent-windows/hooks

Version:
19 lines (18 loc) 451 B
/** * Subscribe to hover events based on `onMouseEnter`, `onMouseLeave` * * Demo * import { useHover } from '@fluent-windows/hooks' * * function handleChange() { * // ... * } * const [status, bind] = useHover(handleChange) * * <button {...bind}>{status}</button> */ declare function useHover(statusHandler?: (status: boolean) => void): [boolean, { onMouseEnter: () => void; onMouseLeave: () => void; }]; export default useHover;