@procore/core-react
Version:
React library of Procore Design Guidelines
37 lines (36 loc) • 1.09 kB
TypeScript
export declare type BreakpointName = 'mobile' | 'tabletPortrait' | 'tabletLandscape' | 'desktop';
declare type MediaValueConfig = Record<BreakpointName, number>;
/**
* Minimum size for that breakpoint to be active
*/
export declare const breakpointsMinSize: MediaValueConfig;
/**
* Maximum size for that breakpoint to be active
*/
export declare const breakpointsMaxSize: MediaValueConfig;
declare type BreakpointMediaQueryList = Record<BreakpointName, string>;
export declare const defaultMediaConfig: {
mobile: string;
tabletPortrait: string;
tabletLandscape: string;
desktop: string;
};
/**
* Point in time check if matching a specific breakpoint
*/
export declare function getCurrentMedia(config?: BreakpointMediaQueryList): {
isMobile: boolean;
isTabletPortrait: boolean;
isTabletLandscape: boolean;
isDesktop: boolean;
};
/**
* Reactive check if matching a specific breakpoint
*/
export declare function useCurrentMedia(): {
isMobile: boolean;
isTabletPortrait: boolean;
isTabletLandscape: boolean;
isDesktop: boolean;
};
export {};