28 lines
		
	
	
		
			599 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			599 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import { Breakpoint } from '../styles/createBreakpoints';
 | 
						|
 | 
						|
export interface WithWidthOptions {
 | 
						|
  resizeInterval: number;
 | 
						|
}
 | 
						|
 | 
						|
export interface WithWidthProps {
 | 
						|
  width: Breakpoint;
 | 
						|
}
 | 
						|
 | 
						|
export function isWidthDown(
 | 
						|
  breakpoint: Breakpoint,
 | 
						|
  screenWidth: Breakpoint,
 | 
						|
  inclusive?: boolean,
 | 
						|
): boolean;
 | 
						|
 | 
						|
export function isWidthUp(
 | 
						|
  breakpoint: Breakpoint,
 | 
						|
  screenWidth: Breakpoint,
 | 
						|
  inclusive?: boolean,
 | 
						|
): boolean;
 | 
						|
 | 
						|
export default function withWidth(
 | 
						|
  options?: WithWidthOptions,
 | 
						|
): <P>(
 | 
						|
  component: React.ComponentType<P & WithWidthProps>,
 | 
						|
) => React.ComponentClass<P & Partial<WithWidthProps>>;
 |