UNPKG

@supunlakmal/hooks

Version:

A collection of reusable React hooks

17 lines (16 loc) 593 B
import { RefObject } from 'react'; interface UseFullscreenResult { isFullscreen: boolean; enterFullscreen: () => Promise<void>; exitFullscreen: () => Promise<void>; toggleFullscreen: () => Promise<void>; isSupported: boolean; } /** * Custom hook to manage fullscreen state for a specific element. * * @param {RefObject<HTMLElement>} ref - Ref attached to the target element. * @returns {UseFullscreenResult} An object with fullscreen status and control functions. */ export declare const useFullscreen: (ref: RefObject<HTMLElement>) => UseFullscreenResult; export {};