mirror of
https://github.com/umami-software/umami.git
synced 2026-02-05 21:27:20 +01:00
Added DialogButton to handle mobile.
This commit is contained in:
parent
036748cdeb
commit
40492ec7c4
32 changed files with 2146 additions and 1807 deletions
|
|
@ -73,6 +73,7 @@ export * from './useGlobalState';
|
|||
export * from './useLanguageNames';
|
||||
export * from './useLocale';
|
||||
export * from './useMessages';
|
||||
export * from './useMobile';
|
||||
export * from './useModified';
|
||||
export * from './useNavigation';
|
||||
export * from './usePagedQuery';
|
||||
|
|
|
|||
8
src/components/hooks/useMobile.ts
Normal file
8
src/components/hooks/useMobile.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import { useBreakpoint } from '@umami/react-zen';
|
||||
|
||||
export function useMobile() {
|
||||
const breakpoint = useBreakpoint();
|
||||
const isMobile = ['xs', 'sm', 'md'].includes(breakpoint);
|
||||
|
||||
return { breakpoint, isMobile };
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue