UNPKG

@blocz/react-responsive

Version:

🔍 <Only /> displays some contents for a specific screen size

16 lines (15 loc) 617 B
export type Units = "em" | "ex" | "%" | "px" | "cm" | "mm" | "in" | "pt" | "pc" | "ch" | "rem" | "vh" | "vw" | "vmin" | "vmax"; type Directions = "width" | "height"; export type ExposedBreakpoint = [number, number] | [number, number, Units] | [number, number, { unit?: Units; direction?: Directions; }]; export interface ExposedBreakpoints { [key: string]: ExposedBreakpoint; } export type Breakpoint = [number, number, Units, Directions]; export interface Breakpoints { [breakpoint: string]: Breakpoint; } export declare const sanitize: (inBreakpoints: ExposedBreakpoints) => Breakpoints; export {};