UNPKG

@anton.bobrov/react-vevet-hooks

Version:

A collection of custom React hooks designed to seamlessly integrate with the `Vevet` library

20 lines 565 B
import { useBreakpointName } from './useBreakpointName'; /** * Custom React hook that checks if the current viewport breakpoint is 'desktop'. * * @example * const MyComponent = () => { * const isDesktop = useIsViewportDesktop(); * * return ( * <div> * {isDesktop ? 'Viewport is of desktop size.' : 'Not desktop'} * </div> * ); * }; */ export function useIsViewportDesktop() { var breakpointName = useBreakpointName(); return breakpointName === 'desktop'; } //# sourceMappingURL=useIsViewportDesktop.js.map