PromoCursed/node_modules/antd/lib/_util/responsiveObserver.d.ts
2024-08-20 23:25:37 +04:00

23 lines
921 B
TypeScript

export type Breakpoint = 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
export type BreakpointMap = Record<Breakpoint, string>;
export type ScreenMap = Partial<Record<Breakpoint, boolean>>;
export type ScreenSizeMap = Partial<Record<Breakpoint, number>>;
export declare const responsiveArray: Breakpoint[];
type SubscribeFunc = (screens: ScreenMap) => void;
export default function useResponsiveObserver(): {
matchHandlers: {
[prop: string]: {
mql: MediaQueryList;
listener: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) | null;
};
};
dispatch(pointMap: ScreenMap): boolean;
subscribe(func: SubscribeFunc): number;
unsubscribe(paramToken: number): void;
unregister(): void;
register(): void;
responsiveMap: BreakpointMap;
};
export declare const matchScreen: (screens: ScreenMap, screenSizes?: ScreenSizeMap) => number | undefined;
export {};