responsive-react
Version:
Device-type based rendering of react components (typescript), like render <SideNav> when desktop and <BottomNav> when mobile or tablet
23 lines (22 loc) • 624 B
TypeScript
import { IdDeviceTypeBreakdown, IdDeviceType, IdDeviceOrientation } from "./ids";
export interface IDeviceWidthInfo {
max: number;
min: number;
}
export declare type DeviceWidth = {
[id in IdDeviceTypeBreakdown]: IDeviceWidthInfo;
};
export interface TypeDeviceWidth extends DeviceWidth {
[key: string]: any;
}
export interface IWindowDimensionMetrics {
width: number;
height: number;
}
export interface IDeviceTypeInfo {
deviceType: IdDeviceType;
deviceTypeVariant: IdDeviceTypeBreakdown;
orientation?: IdDeviceOrientation;
width: number;
height: number;
}