amis-rpc-design/node_modules/antd/es/_util/responsiveObserver.d.ts
2023-10-07 19:42:30 +08: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 {};