@fluent-windows/hooks
Version:
Fluent-Windows React hooks.
19 lines (18 loc) • 451 B
TypeScript
/**
* 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;