@w11r/use-breakpoint
Version:
React useBreakpoint hook to have different values for a variable based on a breakpoints.
9 lines (8 loc) • 462 B
TypeScript
declare type TBreakpointItem = [string, unknown];
declare type TCalculateValue = (defaultValue: unknown, breakpointValues: TBreakpointItem[] | TBreakpointItem, iw: number, ih: number) => typeof defaultValue;
export declare const calculateValue: TCalculateValue;
export declare function useBreakpoint(defaultValue: any, breakpointValues: any[]): any;
export declare function useBreakpoint(): {
[key: string]: boolean;
};
export default useBreakpoint;