@anton.bobrov/react-vevet-hooks
Version:
A collection of custom React hooks designed to seamlessly integrate with the `Vevet` library
21 lines • 700 B
TypeScript
export declare type TUseBreakpointName = 'desktop' | 'tablet' | 'phone';
/**
* Custom React hook that detects the current viewport breakpoint name.
*
* This hook uses the `vevet` library to determine the current viewport size
* and assigns a corresponding breakpoint name ('desktop', 'tablet', or 'phone').
* It updates the breakpoint name when the window is resized.
*
* @example
* const MyComponent = () => {
* const breakpoint = useBreakpointName();
*
* return (
* <div>
* Current Breakpoint: {breakpoint}
* </div>
* );
* };
*/
export declare function useBreakpointName(): TUseBreakpointName;
//# sourceMappingURL=useBreakpointName.d.ts.map