components/example.tsx
1
import { useIsMobile } from "passport-ui";components/example.tsx
1
2
3
4
5
const isMobile = useIsMobile(); if (isMobile) { // Render mobile-specific content}A hook to detect if the current viewport is mobile-sized.
Import the component from the passport-ui package.
import { useIsMobile } from "passport-ui";Basic example showing how to use the component.
const isMobile = useIsMobile(); if (isMobile) { // Render mobile-specific content}Documentation and examples are available in Storybook.