@anton.bobrov/react-vevet-hooks
Version:
A collection of custom React hooks designed to seamlessly integrate with the `Vevet` library
20 lines • 557 B
JavaScript
import { useBreakpointName } from './useBreakpointName';
/**
* Custom React hook that checks if the current viewport breakpoint is 'tablet'.
*
* @example
* const MyComponent = () => {
* const isTablet = useIsViewportTablet();
*
* return (
* <div>
* {isTablet ? 'Viewport is of tablet size.' : 'Not tablet.'}
* </div>
* );
* };
*/
export function useIsViewportTablet() {
var breakpointName = useBreakpointName();
return breakpointName === 'tablet';
}
//# sourceMappingURL=useIsViewportTablet.js.map