UNPKG

mukul-react-hooks

Version:

A comprehensive collection of custom React hooks for modern web development. Includes utilities for fullscreen management, media queries, timeouts, scroll detection, and unsaved change alerts. Built with TypeScript for type safety and optimized for tree-s

21 lines 1.05 kB
interface UseFullscreenReturn { isFullscreen: boolean; toggleFullscreen: () => Promise<void>; } /** * Returns an object with two properties: `isFullscreen` and `toggleFullscreen`. * * `isFullscreen` is a boolean that indicates whether the browser is currently in fullscreen mode. * `toggleFullscreen` is a function that toggles the fullscreen mode on and off. * * This hook listens for changes in the fullscreen mode and updates the `isFullscreen` state accordingly. * It adds event listeners for the 'fullscreenchange', 'mozfullscreenchange', 'webkitfullscreenchange', * and 'msfullscreenchange' events and removes them when the component unmounts. * * @return {UseFullscreenReturn} An object with the following properties: * - `isFullscreen` (boolean): Indicates whether the browser is currently in fullscreen mode. * - `toggleFullscreen` (function): Toggles the fullscreen mode on and off. */ declare const useFullscreen: () => UseFullscreenReturn; export default useFullscreen; //# sourceMappingURL=useFullScreen.d.ts.map