@supunlakmal/hooks
Version:
A collection of reusable React hooks
19 lines (18 loc) • 591 B
TypeScript
/**
* Interface for the state returned by useScreenOrientation.
*/
interface ScreenOrientationState {
/** The type of the screen orientation (e.g., 'portrait-primary'). */
type: OrientationType | null;
/** The angle of the screen orientation. */
angle: number;
/** Indicates if the API is supported. */
isSupported: boolean;
}
/**
* Custom hook to track the screen orientation state.
*
* @returns An object containing the current screen orientation type and angle.
*/
export declare function useScreenOrientation(): Readonly<ScreenOrientationState>;
export {};