mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Support Partial<> on setState now that TS 2.1 is out * Update readme to reflect setState being typed correctly * Switch setState to Pick * Restore cloneELement portion of readme * Use Pick<> | S for setState due to cast issue * state and props should be readonly * Fix nit + document why we * Add typescript compiler header * Update to properly order headers * Update readme to reflect 2.1.5 fixing stPick * Update readme now that 2.1.5 is out * All that depend on react now require 2.1 * Fix definition that fails due to readonly state
66 lines
2.2 KiB
TypeScript
66 lines
2.2 KiB
TypeScript
// Type definitions for react-responsive 1.1.3
|
|
// Project: https://github.com/contra/react-responsive
|
|
// Definitions by: Alexey Svetliakov <https://github.com/asvetliakov>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.1
|
|
|
|
declare module "react-responsive" {
|
|
import * as React from "react";
|
|
|
|
namespace MediaQuery {
|
|
export interface MediaQueryProps {
|
|
query?: string;
|
|
// matchers
|
|
orientation?: "portrait" | "landscape";
|
|
scan?: "progressive" | "interlace";
|
|
aspectRatio?: string;
|
|
deviceAspectRatio?: string;
|
|
height?: number | string;
|
|
deviceHeight?: number | string;
|
|
width?: number | string;
|
|
deviceWidth?: number | string;
|
|
color?: boolean;
|
|
colorIndex?: boolean;
|
|
monochrome?: boolean;
|
|
resolution?: number | string;
|
|
// types
|
|
minAspectRatio?: string;
|
|
maxAspectRatio?: string;
|
|
minDeviceAspectRatio?: string;
|
|
maxDeviceAspectRatio?: string;
|
|
minHeight?: number | string;
|
|
maxHeight?: number | string;
|
|
minDeviceHeight?: number | string;
|
|
maxDeviceHeight?: number | string;
|
|
minDeviceWidth?: number | string;
|
|
maxDeviceWidth?: number | string;
|
|
minWidth?: number | string;
|
|
maxWidth?: number | string;
|
|
minColor?: number;
|
|
maxColor?: number;
|
|
minColorIndex?: number;
|
|
maxColorIndex?: number;
|
|
minMonochrome?: number;
|
|
maxMonochrome?: number;
|
|
minResolution?: number | string;
|
|
maxResolution?: number | string;
|
|
// types
|
|
all?: boolean;
|
|
grid?: boolean;
|
|
aural?: boolean;
|
|
braille?: boolean;
|
|
handheld?: boolean;
|
|
print?: boolean;
|
|
projection?: boolean;
|
|
screen?: boolean;
|
|
tty?: boolean;
|
|
tv?: boolean;
|
|
embossed?: boolean;
|
|
}
|
|
}
|
|
|
|
class MediaQuery extends React.Component<MediaQuery.MediaQueryProps, any> { }
|
|
export = MediaQuery;
|
|
|
|
}
|