Lint react-* packages (#15526)

This commit is contained in:
Andy
2017-03-30 14:11:46 -07:00
committed by GitHub
parent 4fd2d7547c
commit 3d13ec5399
41 changed files with 575 additions and 614 deletions

View File

@@ -4,7 +4,6 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
import * as React from 'react';
declare class Autosuggest extends React.Component<any, any> {}
@@ -32,11 +31,11 @@ declare namespace Autosuggest {
interface InputProps extends React.HTMLAttributes<any> {
value: string;
onChange: (event: React.FormEvent<any>, params?: ChangeEvent) => void;
onBlur?: (event: React.FormEvent<any>, params?: BlurEvent) => void;
onChange(event: React.FormEvent<any>, params?: ChangeEvent): void;
onBlur?(event: React.FormEvent<any>, params?: BlurEvent): void;
}
export interface SuggestionSelectedEventData<TSuggestion> {
interface SuggestionSelectedEventData<TSuggestion> {
method: 'click' | 'enter';
sectionIndex: number | null;
suggestion: TSuggestion;
@@ -57,23 +56,22 @@ declare namespace Autosuggest {
interface AutosuggestProps extends React.Props<Autosuggest> {
suggestions: any[];
onSuggestionsFetchRequested: (request: SuggestionsFetchRequest) => void;
onSuggestionsClearRequested?: () => void;
getSuggestionValue: (suggestion: any) => any;
renderSuggestion: (suggestion: any, inputValues: InputValues) => JSX.Element;
onSuggestionsFetchRequested(request: SuggestionsFetchRequest): void;
onSuggestionsClearRequested?(): void;
getSuggestionValue(suggestion: any): any;
renderSuggestion(suggestion: any, inputValues: InputValues): JSX.Element;
inputProps: InputProps;
onSuggestionSelected?: (event: React.FormEvent<any>, data: SuggestionSelectedEventData<any>) => void;
shouldRenderSuggestions?: (value: string) => boolean;
onSuggestionSelected?(event: React.FormEvent<any>, data: SuggestionSelectedEventData<any>): void;
shouldRenderSuggestions?(value: string): boolean;
alwaysRenderSuggestions?: boolean;
focusFirstSuggestion?: boolean;
focusInputOnSuggestionClick?: boolean;
multiSection?: boolean;
renderSectionTitle?: (section: any, inputValues: InputValues) => JSX.Element;
getSectionSuggestions?: (section: any) => any[];
renderInputComponent?: () => JSX.Element;
renderSuggestionsContainer?: (children: any) => JSX.Element;
renderSectionTitle?(section: any, inputValues: InputValues): JSX.Element;
getSectionSuggestions?(section: any): any[];
renderInputComponent?(): JSX.Element;
renderSuggestionsContainer?(children: any): JSX.Element;
theme?: Theme;
id?: string;
}
}

View File

@@ -13,4 +13,4 @@ declare class BodyClassName extends React.Component<{ className: string }, any>
static displayName: string;
static peek(): any;
static rewind(): any;
}
}

View File

@@ -23,4 +23,4 @@ class App {
// Becuase we nested the component, our body will now have 'app home'
// as the class name
}
}
}

View File

@@ -14,10 +14,9 @@ declare const DatePicker: DatePicker;
type DatePicker = ComponentClass<DatePicker.DatePickerProps>;
declare namespace DatePicker {
type ChangeCallback = (value: string, formattedValue: string) => void;
export type ChangeCallback = (value: string, formattedValue: string) => void;
export interface DatePickerProps {
interface DatePickerProps {
value?: string;
defaultValue?: string;
style?: any;
@@ -30,7 +29,7 @@ declare namespace DatePicker {
dateFormat?: string;
clearButtonElement?: ReactNode;
showClearButton?: boolean;
onClear?: () => void;
onClear?(): void;
previousButtonElement?: ReactNode;
nextButtonElement?: ReactNode;
cellPadding?: string;
@@ -43,5 +42,4 @@ declare namespace DatePicker {
todayButtonLabel?: string;
customControl?: StatelessComponent<any> | ComponentClass<any>;
}
}

View File

@@ -18,7 +18,7 @@ declare namespace CopyToClipboard {
interface Props {
text: string;
onCopy?: (a: string) => void;
onCopy?(a: string): void;
options?: Options;
}
}

View File

@@ -47,6 +47,6 @@ class CaptionElement extends React.Component<CaptionElementProps, {}> {
{ localeUtils.formatMonthTitle(date, locale) }
</div>
);
};
}
}
<DayPicker captionElement={ <CaptionElement /> }/>;

View File

@@ -4,7 +4,7 @@
import React = require("react");
import ReactDnd = require("react-dnd");
var r = React.DOM;
const r = React.DOM;
import DragSource = ReactDnd.DragSource;
import DropTarget = ReactDnd.DropTarget;
@@ -15,8 +15,8 @@ import HTML5Backend, { getEmptyImage } from 'react-dnd-html5-backend';
// ----------------------------------------------------------------------
namespace Game {
var knightPosition = [0, 0];
var observer: any = null;
let knightPosition = [0, 0];
let observer: any = null;
function emitChange() {
observer(knightPosition);
@@ -47,7 +47,7 @@ namespace Game {
}
}
var ItemTypes = {
const ItemTypes = {
KNIGHT: "knight"
};
@@ -61,7 +61,7 @@ namespace Knight {
isDragging: boolean;
}
var knightSource: ReactDnd.DragSourceSpec<KnightP> = {
const knightSource: ReactDnd.DragSourceSpec<KnightP> = {
beginDrag: (props) => {
return {};
}
@@ -81,7 +81,7 @@ namespace Knight {
static create = React.createFactory(Knight);
componentDidMount() {
var img = getEmptyImage();
const img = getEmptyImage();
img.onload = () => this.props.connectDragPreview(img);
}
@@ -99,8 +99,8 @@ namespace Knight {
}
}
export var DndKnight = DragSource(ItemTypes.KNIGHT, knightSource, knightCollect)(Knight);
export var create = React.createFactory(DndKnight);
export const DndKnight = DragSource(ItemTypes.KNIGHT, knightSource, knightCollect)(Knight);
export const create = React.createFactory(DndKnight);
}
// Square Component
@@ -113,7 +113,7 @@ namespace Square {
export class Square extends React.Component<SquareP, {}> {
render() {
var fill = this.props.black ? 'black' : 'white';
const fill = this.props.black ? 'black' : 'white';
return r.div({
style: {
backgroundColor: fill
@@ -122,7 +122,7 @@ namespace Square {
}
}
export var create = React.createFactory(Square);
export const create = React.createFactory(Square);
}
// BoardSquare Component
@@ -137,7 +137,7 @@ namespace BoardSquare {
canDrop?: boolean;
}
var boardSquareTarget: ReactDnd.DropTargetSpec<BoardSquareP> = {
const boardSquareTarget: ReactDnd.DropTargetSpec<BoardSquareP> = {
canDrop: (props) => Game.canMoveKnight(props.x, props.y),
drop: (props) => Game.moveKnight(props.x, props.y)
};
@@ -169,9 +169,9 @@ namespace BoardSquare {
}
render() {
var black = (this.props.x + this.props.y) % 2 === 1;
var isOver = this.props.isOver;
var canDrop = this.props.canDrop;
const black = (this.props.x + this.props.y) % 2 === 1;
const isOver = this.props.isOver;
const canDrop = this.props.canDrop;
return this.props.connectDropTarget(
r.div({
@@ -191,8 +191,8 @@ namespace BoardSquare {
}
}
export var DndBoardSquare = DropTarget(ItemTypes.KNIGHT, boardSquareTarget, boardSquareCollect)(BoardSquare);
export var create = React.createFactory(DndBoardSquare);
export const DndBoardSquare = DropTarget(ItemTypes.KNIGHT, boardSquareTarget, boardSquareCollect)(BoardSquare);
export const create = React.createFactory(DndBoardSquare);
}
// Custom Drag Layer Component
@@ -216,9 +216,9 @@ namespace CustomDragLayer {
}
}
export var dragLayer = DragLayer(dragLayerCollect)(CustomDragLayer);
export const dragLayer = DragLayer(dragLayerCollect)(CustomDragLayer);
export var create = React.createFactory(dragLayer);
export const create = React.createFactory(dragLayer);
}
// Board Component
@@ -231,16 +231,16 @@ namespace Board {
export class Board extends React.Component<BoardP, {}> {
private _renderPiece = (x: number, y: number) => {
var knightX = this.props.knightPosition[0];
var knightY = this.props.knightPosition[1];
const knightX = this.props.knightPosition[0];
const knightY = this.props.knightPosition[1];
return x === knightX && y === knightY ?
Knight.create() :
null;
}
private _renderSquare = (i: number) => {
var x = i % 8;
var y = Math.floor(i / 8);
const x = i % 8;
const y = Math.floor(i / 8);
return r.div({
key: i,
@@ -252,7 +252,7 @@ namespace Board {
}
render() {
var squares: Array<React.ReactHTMLElement<HTMLDivElement>> = [];
const squares: Array<React.ReactHTMLElement<HTMLDivElement>> = [];
for (let i = 0; i < 64; i++) {
squares.push(this._renderSquare(i));
}
@@ -274,7 +274,7 @@ namespace Board {
}
}
export var createWithHTMLBackend = React.createFactory(DragDropContext(HTML5Backend)(Board));
export const createWithHTMLBackend = React.createFactory(DragDropContext(HTML5Backend)(Board));
}
// Render the Board Component

View File

@@ -21,188 +21,188 @@ export function withOptions<T>(handler: (ev: T) => any, options: EventOptions):
export interface EventListenerProps {
// Global events
onPointerCancel?: (ev: PointerEvent) => any;
onPointerCancelCapture?: (ev: PointerEvent) => any;
onPointerDown?: (ev: PointerEvent) => any;
onPointerDownCapture?: (ev: PointerEvent) => any;
onPointerEnter?: (ev: PointerEvent) => any;
onPointerEnterCapture?: (ev: PointerEvent) => any;
onPointerLeave?: (ev: PointerEvent) => any;
onPointerLeaveCapture?: (ev: PointerEvent) => any;
onPointerMove?: (ev: PointerEvent) => any;
onPointerMoveCapture?: (ev: PointerEvent) => any;
onPointerOut?: (ev: PointerEvent) => any;
onPointerOutCapture?: (ev: PointerEvent) => any;
onPointerOver?: (ev: PointerEvent) => any;
onPointerOverCapture?: (ev: PointerEvent) => any;
onPointerUp?: (ev: PointerEvent) => any;
onPointerUpCapture?: (ev: PointerEvent) => any;
onWheel?: (ev: WheelEvent) => any;
onWheelCapture?: (ev: WheelEvent) => any;
onAbort?: (ev: Event) => any;
onAbortCapture?: (ev: Event) => any;
onAfterPrint?: (ev: Event) => any;
onAfterPrintCapture?: (ev: Event) => any;
onBeforePrint?: (ev: Event) => any;
onBeforePrintCapture?: (ev: Event) => any;
onBeforeUnload?: (ev: BeforeUnloadEvent) => any;
onBeforeUnloadCapture?: (ev: BeforeUnloadEvent) => any;
onBlur?: (ev: FocusEvent) => any;
onBlurCapture?: (ev: FocusEvent) => any;
onCanPlay?: (ev: Event) => any;
onCanPlayCapture?: (ev: Event) => any;
onCanPlayThrough?: (ev: Event) => any;
onCanPlayThroughCapture?: (ev: Event) => any;
onChange?: (ev: Event) => any;
onChangeCapture?: (ev: Event) => any;
onClick?: (ev: MouseEvent) => any;
onClickCapture?: (ev: MouseEvent) => any;
onCompassNeedsCalibration?: (ev: Event) => any;
onCompassNeedsCalibrationCapture?: (ev: Event) => any;
onContextMenu?: (ev: PointerEvent) => any;
onContextMenuCapture?: (ev: PointerEvent) => any;
onDblClick?: (ev: MouseEvent) => any;
onDblClickCapture?: (ev: MouseEvent) => any;
onDeviceMotion?: (ev: DeviceMotionEvent) => any;
onDeviceMotionCapture?: (ev: DeviceMotionEvent) => any;
onDeviceOrientation?: (ev: DeviceOrientationEvent) => any;
onDeviceOrientationCapture?: (ev: DeviceOrientationEvent) => any;
onDrag?: (ev: DragEvent) => any;
onDragCapture?: (ev: DragEvent) => any;
onDragEnd?: (ev: DragEvent) => any;
onDragEndCapture?: (ev: DragEvent) => any;
onDragEnter?: (ev: DragEvent) => any;
onDragEnterCapture?: (ev: DragEvent) => any;
onDragLeave?: (ev: DragEvent) => any;
onDragLeaveCapture?: (ev: DragEvent) => any;
onDragOver?: (ev: DragEvent) => any;
onDragOverCapture?: (ev: DragEvent) => any;
onDragStart?: (ev: DragEvent) => any;
onDragStartCapture?: (ev: DragEvent) => any;
onDrop?: (ev: DragEvent) => any;
onDropCapture?: (ev: DragEvent) => any;
onDurationChange?: (ev: Event) => any;
onDurationChangeCapture?: (ev: Event) => any;
onEmptied?: (ev: Event) => any;
onEmptiedCapture?: (ev: Event) => any;
onEnded?: (ev: Event) => any;
onEndedCapture?: (ev: Event) => any;
onPointerCancel?(ev: PointerEvent): any;
onPointerCancelCapture?(ev: PointerEvent): any;
onPointerDown?(ev: PointerEvent): any;
onPointerDownCapture?(ev: PointerEvent): any;
onPointerEnter?(ev: PointerEvent): any;
onPointerEnterCapture?(ev: PointerEvent): any;
onPointerLeave?(ev: PointerEvent): any;
onPointerLeaveCapture?(ev: PointerEvent): any;
onPointerMove?(ev: PointerEvent): any;
onPointerMoveCapture?(ev: PointerEvent): any;
onPointerOut?(ev: PointerEvent): any;
onPointerOutCapture?(ev: PointerEvent): any;
onPointerOver?(ev: PointerEvent): any;
onPointerOverCapture?(ev: PointerEvent): any;
onPointerUp?(ev: PointerEvent): any;
onPointerUpCapture?(ev: PointerEvent): any;
onWheel?(ev: WheelEvent): any;
onWheelCapture?(ev: WheelEvent): any;
onAbort?(ev: Event): any;
onAbortCapture?(ev: Event): any;
onAfterPrint?(ev: Event): any;
onAfterPrintCapture?(ev: Event): any;
onBeforePrint?(ev: Event): any;
onBeforePrintCapture?(ev: Event): any;
onBeforeUnload?(ev: BeforeUnloadEvent): any;
onBeforeUnloadCapture?(ev: BeforeUnloadEvent): any;
onBlur?(ev: FocusEvent): any;
onBlurCapture?(ev: FocusEvent): any;
onCanPlay?(ev: Event): any;
onCanPlayCapture?(ev: Event): any;
onCanPlayThrough?(ev: Event): any;
onCanPlayThroughCapture?(ev: Event): any;
onChange?(ev: Event): any;
onChangeCapture?(ev: Event): any;
onClick?(ev: MouseEvent): any;
onClickCapture?(ev: MouseEvent): any;
onCompassNeedsCalibration?(ev: Event): any;
onCompassNeedsCalibrationCapture?(ev: Event): any;
onContextMenu?(ev: PointerEvent): any;
onContextMenuCapture?(ev: PointerEvent): any;
onDblClick?(ev: MouseEvent): any;
onDblClickCapture?(ev: MouseEvent): any;
onDeviceMotion?(ev: DeviceMotionEvent): any;
onDeviceMotionCapture?(ev: DeviceMotionEvent): any;
onDeviceOrientation?(ev: DeviceOrientationEvent): any;
onDeviceOrientationCapture?(ev: DeviceOrientationEvent): any;
onDrag?(ev: DragEvent): any;
onDragCapture?(ev: DragEvent): any;
onDragEnd?(ev: DragEvent): any;
onDragEndCapture?(ev: DragEvent): any;
onDragEnter?(ev: DragEvent): any;
onDragEnterCapture?(ev: DragEvent): any;
onDragLeave?(ev: DragEvent): any;
onDragLeaveCapture?(ev: DragEvent): any;
onDragOver?(ev: DragEvent): any;
onDragOverCapture?(ev: DragEvent): any;
onDragStart?(ev: DragEvent): any;
onDragStartCapture?(ev: DragEvent): any;
onDrop?(ev: DragEvent): any;
onDropCapture?(ev: DragEvent): any;
onDurationChange?(ev: Event): any;
onDurationChangeCapture?(ev: Event): any;
onEmptied?(ev: Event): any;
onEmptiedCapture?(ev: Event): any;
onEnded?(ev: Event): any;
onEndedCapture?(ev: Event): any;
onError?: ErrorEventHandler;
onErrorCapture?: ErrorEventHandler;
onFocus?: (ev: FocusEvent) => any;
onFocusCapture?: (ev: FocusEvent) => any;
onHashChange?: (ev: HashChangeEvent) => any;
onHashChangeCapture?: (ev: HashChangeEvent) => any;
onInput?: (ev: Event) => any;
onInputCapture?: (ev: Event) => any;
onKeyDown?: (ev: KeyboardEvent) => any;
onKeyDownCapture?: (ev: KeyboardEvent) => any;
onKeyPress?: (ev: KeyboardEvent) => any;
onKeyPressCapture?: (ev: KeyboardEvent) => any;
onKeyUp?: (ev: KeyboardEvent) => any;
onKeyUpCapture?: (ev: KeyboardEvent) => any;
onLoad?: (ev: Event) => any;
onLoadCapture?: (ev: Event) => any;
onLoadedData?: (ev: Event) => any;
onLoadedDataCapture?: (ev: Event) => any;
onLoadedMetadata?: (ev: Event) => any;
onLoadedMetadataCapture?: (ev: Event) => any;
onLoadStart?: (ev: Event) => any;
onLoadStartCapture?: (ev: Event) => any;
onMessage?: (ev: MessageEvent) => any;
onMessageCapture?: (ev: MessageEvent) => any;
onMouseDown?: (ev: MouseEvent) => any;
onMouseDownCapture?: (ev: MouseEvent) => any;
onMouseEnter?: (ev: MouseEvent) => any;
onMouseEnterCapture?: (ev: MouseEvent) => any;
onMouseLeave?: (ev: MouseEvent) => any;
onMouseLeaveCapture?: (ev: MouseEvent) => any;
onMouseMove?: (ev: MouseEvent) => any;
onMouseMoveCapture?: (ev: MouseEvent) => any;
onMouseOut?: (ev: MouseEvent) => any;
onMouseOutCapture?: (ev: MouseEvent) => any;
onMouseOver?: (ev: MouseEvent) => any;
onMouseOverCapture?: (ev: MouseEvent) => any;
onMouseUp?: (ev: MouseEvent) => any;
onMouseUpCapture?: (ev: MouseEvent) => any;
onMouseWheel?: (ev: MouseWheelEvent) => any;
onMouseWheelCapture?: (ev: MouseWheelEvent) => any;
onMsGestureChange?: (ev: MSGestureEvent) => any;
onMsGestureChangeCapture?: (ev: MSGestureEvent) => any;
onMsGestureDoubleTap?: (ev: MSGestureEvent) => any;
onMsGestureDoubleTapCapture?: (ev: MSGestureEvent) => any;
onMsGestureEnd?: (ev: MSGestureEvent) => any;
onMsGestureEndCapture?: (ev: MSGestureEvent) => any;
onMsGestureHold?: (ev: MSGestureEvent) => any;
onMsGestureHoldCapture?: (ev: MSGestureEvent) => any;
onMsGestureStart?: (ev: MSGestureEvent) => any;
onMsGestureStartCapture?: (ev: MSGestureEvent) => any;
onMsGestureTap?: (ev: MSGestureEvent) => any;
onMsGestureTapCapture?: (ev: MSGestureEvent) => any;
onMsInertiaStart?: (ev: MSGestureEvent) => any;
onMsInertiaStartCapture?: (ev: MSGestureEvent) => any;
onMsPointerCancel?: (ev: MSPointerEvent) => any;
onMsPointerCancelCapture?: (ev: MSPointerEvent) => any;
onMsPointerDown?: (ev: MSPointerEvent) => any;
onMsPointerDownCapture?: (ev: MSPointerEvent) => any;
onMsPointerEnter?: (ev: MSPointerEvent) => any;
onMsPointerEnterCapture?: (ev: MSPointerEvent) => any;
onMsPointerLeave?: (ev: MSPointerEvent) => any;
onMsPointerLeaveCapture?: (ev: MSPointerEvent) => any;
onMsPointerMove?: (ev: MSPointerEvent) => any;
onMsPointerMoveCapture?: (ev: MSPointerEvent) => any;
onMsPointerOut?: (ev: MSPointerEvent) => any;
onMsPointerOutCapture?: (ev: MSPointerEvent) => any;
onMsPointerOver?: (ev: MSPointerEvent) => any;
onMsPointerOverCapture?: (ev: MSPointerEvent) => any;
oNmsPointerUp?: (ev: MSPointerEvent) => any;
oNmsPointerUpCapture?: (ev: MSPointerEvent) => any;
onOffline?: (ev: Event) => any;
onOfflineCapture?: (ev: Event) => any;
onOnline?: (ev: Event) => any;
onOnlineCapture?: (ev: Event) => any;
onOrientationChange?: (ev: Event) => any;
onOrientationChangeCapture?: (ev: Event) => any;
onPageHide?: (ev: PageTransitionEvent) => any;
onPageHideCapture?: (ev: PageTransitionEvent) => any;
onPageShow?: (ev: PageTransitionEvent) => any;
onPageShowCapture?: (ev: PageTransitionEvent) => any;
onPause?: (ev: Event) => any;
onPauseCapture?: (ev: Event) => any;
onPlay?: (ev: Event) => any;
onPlayCapture?: (ev: Event) => any;
onPlaying?: (ev: Event) => any;
onPlayingCapture?: (ev: Event) => any;
onPopState?: (ev: PopStateEvent) => any;
onPopStateCapture?: (ev: PopStateEvent) => any;
onProgress?: (ev: ProgressEvent) => any;
onProgressCapture?: (ev: ProgressEvent) => any;
onRateChange?: (ev: Event) => any;
onRateChangeCapture?: (ev: Event) => any;
onReadyStateChange?: (ev: ProgressEvent) => any;
onReadyStateChangeCapture?: (ev: ProgressEvent) => any;
onReset?: (ev: Event) => any;
onResetCapture?: (ev: Event) => any;
onResize?: (ev: UIEvent) => any;
onResizeCapture?: (ev: UIEvent) => any;
onScroll?: (ev: UIEvent) => any;
onScrollCapture?: (ev: UIEvent) => any;
onSeeked?: (ev: Event) => any;
onSeekedCapture?: (ev: Event) => any;
onSeeking?: (ev: Event) => any;
onSeekingCapture?: (ev: Event) => any;
onSelect?: (ev: UIEvent) => any;
onSelectCapture?: (ev: UIEvent) => any;
onStalled?: (ev: Event) => any;
onStalledCapture?: (ev: Event) => any;
onStorage?: (ev: StorageEvent) => any;
onStorageCapture?: (ev: StorageEvent) => any;
onSubmit?: (ev: Event) => any;
onSubmitCapture?: (ev: Event) => any;
onSuspend?: (ev: Event) => any;
onSuspendCapture?: (ev: Event) => any;
onTimeUpdate?: (ev: Event) => any;
onTimeUpdateCapture?: (ev: Event) => any;
onFocus?(ev: FocusEvent): any;
onFocusCapture?(ev: FocusEvent): any;
onHashChange?(ev: HashChangeEvent): any;
onHashChangeCapture?(ev: HashChangeEvent): any;
onInput?(ev: Event): any;
onInputCapture?(ev: Event): any;
onKeyDown?(ev: KeyboardEvent): any;
onKeyDownCapture?(ev: KeyboardEvent): any;
onKeyPress?(ev: KeyboardEvent): any;
onKeyPressCapture?(ev: KeyboardEvent): any;
onKeyUp?(ev: KeyboardEvent): any;
onKeyUpCapture?(ev: KeyboardEvent): any;
onLoad?(ev: Event): any;
onLoadCapture?(ev: Event): any;
onLoadedData?(ev: Event): any;
onLoadedDataCapture?(ev: Event): any;
onLoadedMetadata?(ev: Event): any;
onLoadedMetadataCapture?(ev: Event): any;
onLoadStart?(ev: Event): any;
onLoadStartCapture?(ev: Event): any;
onMessage?(ev: MessageEvent): any;
onMessageCapture?(ev: MessageEvent): any;
onMouseDown?(ev: MouseEvent): any;
onMouseDownCapture?(ev: MouseEvent): any;
onMouseEnter?(ev: MouseEvent): any;
onMouseEnterCapture?(ev: MouseEvent): any;
onMouseLeave?(ev: MouseEvent): any;
onMouseLeaveCapture?(ev: MouseEvent): any;
onMouseMove?(ev: MouseEvent): any;
onMouseMoveCapture?(ev: MouseEvent): any;
onMouseOut?(ev: MouseEvent): any;
onMouseOutCapture?(ev: MouseEvent): any;
onMouseOver?(ev: MouseEvent): any;
onMouseOverCapture?(ev: MouseEvent): any;
onMouseUp?(ev: MouseEvent): any;
onMouseUpCapture?(ev: MouseEvent): any;
onMouseWheel?(ev: MouseWheelEvent): any;
onMouseWheelCapture?(ev: MouseWheelEvent): any;
onMsGestureChange?(ev: MSGestureEvent): any;
onMsGestureChangeCapture?(ev: MSGestureEvent): any;
onMsGestureDoubleTap?(ev: MSGestureEvent): any;
onMsGestureDoubleTapCapture?(ev: MSGestureEvent): any;
onMsGestureEnd?(ev: MSGestureEvent): any;
onMsGestureEndCapture?(ev: MSGestureEvent): any;
onMsGestureHold?(ev: MSGestureEvent): any;
onMsGestureHoldCapture?(ev: MSGestureEvent): any;
onMsGestureStart?(ev: MSGestureEvent): any;
onMsGestureStartCapture?(ev: MSGestureEvent): any;
onMsGestureTap?(ev: MSGestureEvent): any;
onMsGestureTapCapture?(ev: MSGestureEvent): any;
onMsInertiaStart?(ev: MSGestureEvent): any;
onMsInertiaStartCapture?(ev: MSGestureEvent): any;
onMsPointerCancel?(ev: MSPointerEvent): any;
onMsPointerCancelCapture?(ev: MSPointerEvent): any;
onMsPointerDown?(ev: MSPointerEvent): any;
onMsPointerDownCapture?(ev: MSPointerEvent): any;
onMsPointerEnter?(ev: MSPointerEvent): any;
onMsPointerEnterCapture?(ev: MSPointerEvent): any;
onMsPointerLeave?(ev: MSPointerEvent): any;
onMsPointerLeaveCapture?(ev: MSPointerEvent): any;
onMsPointerMove?(ev: MSPointerEvent): any;
onMsPointerMoveCapture?(ev: MSPointerEvent): any;
onMsPointerOut?(ev: MSPointerEvent): any;
onMsPointerOutCapture?(ev: MSPointerEvent): any;
onMsPointerOver?(ev: MSPointerEvent): any;
onMsPointerOverCapture?(ev: MSPointerEvent): any;
oNmsPointerUp?(ev: MSPointerEvent): any;
oNmsPointerUpCapture?(ev: MSPointerEvent): any;
onOffline?(ev: Event): any;
onOfflineCapture?(ev: Event): any;
onOnline?(ev: Event): any;
onOnlineCapture?(ev: Event): any;
onOrientationChange?(ev: Event): any;
onOrientationChangeCapture?(ev: Event): any;
onPageHide?(ev: PageTransitionEvent): any;
onPageHideCapture?(ev: PageTransitionEvent): any;
onPageShow?(ev: PageTransitionEvent): any;
onPageShowCapture?(ev: PageTransitionEvent): any;
onPause?(ev: Event): any;
onPauseCapture?(ev: Event): any;
onPlay?(ev: Event): any;
onPlayCapture?(ev: Event): any;
onPlaying?(ev: Event): any;
onPlayingCapture?(ev: Event): any;
onPopState?(ev: PopStateEvent): any;
onPopStateCapture?(ev: PopStateEvent): any;
onProgress?(ev: ProgressEvent): any;
onProgressCapture?(ev: ProgressEvent): any;
onRateChange?(ev: Event): any;
onRateChangeCapture?(ev: Event): any;
onReadyStateChange?(ev: ProgressEvent): any;
onReadyStateChangeCapture?(ev: ProgressEvent): any;
onReset?(ev: Event): any;
onResetCapture?(ev: Event): any;
onResize?(ev: UIEvent): any;
onResizeCapture?(ev: UIEvent): any;
onScroll?(ev: UIEvent): any;
onScrollCapture?(ev: UIEvent): any;
onSeeked?(ev: Event): any;
onSeekedCapture?(ev: Event): any;
onSeeking?(ev: Event): any;
onSeekingCapture?(ev: Event): any;
onSelect?(ev: UIEvent): any;
onSelectCapture?(ev: UIEvent): any;
onStalled?(ev: Event): any;
onStalledCapture?(ev: Event): any;
onStorage?(ev: StorageEvent): any;
onStorageCapture?(ev: StorageEvent): any;
onSubmit?(ev: Event): any;
onSubmitCapture?(ev: Event): any;
onSuspend?(ev: Event): any;
onSuspendCapture?(ev: Event): any;
onTimeUpdate?(ev: Event): any;
onTimeUpdateCapture?(ev: Event): any;
onTouchCancel?: any;
onTouchCancelCapture?: any;
onTouchEnd?: any;
@@ -211,12 +211,12 @@ export interface EventListenerProps {
onTouchMoveCapture?: any;
onTouchStart?: any;
onTouchStartCapture?: any;
onUnload?: (ev: Event) => any;
onUnloadCapture?: (ev: Event) => any;
onVolumeChange?: (ev: Event) => any;
onVolumeChangeCapture?: (ev: Event) => any;
onWaiting?: (ev: Event) => any;
onWaitingCapture?: (ev: Event) => any;
onUnload?(ev: Event): any;
onUnloadCapture?(ev: Event): any;
onVolumeChange?(ev: Event): any;
onVolumeChangeCapture?(ev: Event): any;
onWaiting?(ev: Event): any;
onWaitingCapture?(ev: Event): any;
/**
* Target (window or document)

View File

@@ -9,7 +9,7 @@ import * as React from "react";
declare namespace ReactFacebookLogin {
interface ReactFacebookLoginProps {
appId: string;
callback: (userInfo: ReactFacebookLoginInfo) => void;
callback(userInfo: ReactFacebookLoginInfo): void;
autoLoad?: boolean;
buttonStyle?: React.CSSProperties;
@@ -21,7 +21,7 @@ declare namespace ReactFacebookLogin {
icon?: string | React.ReactNode;
isDisabled?: boolean;
language?: string;
onClick?: () => void;
onClick?(): void;
reAuthenticate?: boolean;
redirectUri?: string;
scope?: string;

View File

@@ -22,10 +22,10 @@ declare class Gravatar extends React.Component<Gravatar.Props, void> {
}
declare namespace Gravatar {
export type DefaultImage = "404" | "mm" | "identicon" | "monsterid" | "wavatar" | "retro" | "blank";
export type Rating = "g" | "pg" | "r" | "x";
type DefaultImage = "404" | "mm" | "identicon" | "monsterid" | "wavatar" | "retro" | "blank";
type Rating = "g" | "pg" | "r" | "x";
export interface Props {
interface Props {
/**
* The email address used to look up the Gravatar image.
* If you wish to avoid sending an email address to the client, you can compute the md5 hash on the server and

View File

@@ -37,4 +37,4 @@ class GravatarMinimalTest extends React.Component<void, void> {
render() {
return <Gravatar email="test@example.com" />;
}
}
}

View File

@@ -22,7 +22,7 @@ interface HighlighterProps {
/** Type of tag to wrap around highlighted matches; defaults to mark */
highlightTag?: string;
/** Process each search word and text to highlight before comparing (eg remove accents); signature (text: string): string */
sanitize?: (text: string) => string;
sanitize?(text: string): string;
/** Array of search words */
searchWords: string[];
/** Text to highlight matches in */

View File

@@ -10,4 +10,4 @@ export class ReactHolderTest extends React.Component<any, any> {
</div>
);
}
}
}

View File

@@ -12,6 +12,4 @@ export interface IconBaseProps {
style?: React.CSSProperties;
}
export default class IconBase extends React.Component<IconBaseProps, any> {
}
export default class IconBase extends React.Component<IconBaseProps, any> {}

View File

@@ -1,4 +1,4 @@
import * as React from 'react';
import IconBase from 'react-icon-base';
export default <IconBase size={30} color='aliceblue' style={{ margin: "30px" }} />;
export default <IconBase size={30} color='aliceblue' style={{ margin: "30px" }} />;

View File

@@ -7,5 +7,3 @@ class Question extends React.Component<any, any> {
return <h3> Lets go for a <FaBeer /><FaExclamation />? </h3>;
}
}

View File

@@ -1 +1,8 @@
{ "extends": "../tslint.json" }
{
"extends": "../tslint.json",
"rules": {
"eofline": false,
"no-useless-files": false,
"no-var": false
}
}

View File

@@ -7,7 +7,7 @@
import * as React from "react";
declare namespace reactInputMask {
export interface ReactInputMaskProps extends React.HTMLAttributes<HTMLInputElement> {
interface ReactInputMaskProps extends React.HTMLAttributes<HTMLInputElement> {
/**
* Mask string. Format characters are:
* * `9`: `0-9`
@@ -37,7 +37,7 @@ declare namespace reactInputMask {
*/
alwaysShowMask?: boolean;
}
export class ReactInputMask extends React.Component<ReactInputMaskProps, {}> {
class ReactInputMask extends React.Component<ReactInputMaskProps, {}> {
}
}
declare var ReactInputMask: typeof reactInputMask.ReactInputMask;

View File

@@ -130,7 +130,7 @@ interface Props {
/**
* It will be called when the tour's state changes.
*/
callback?: (options: any) => void;
callback?(options: any): void;
}
export interface Step {

View File

@@ -14,9 +14,7 @@ declare const JSONPretty: JSONPretty;
type JSONPretty = ComponentClass<JSONPretty.JSONPrettyProps>;
declare namespace JSONPretty {
export interface JSONPrettyProps extends HTMLProps<JSONPretty> {
interface JSONPrettyProps extends HTMLProps<JSONPretty> {
json: {} | string;
}
}

View File

@@ -11,59 +11,59 @@ import * as React from 'react';
// which already declares things with some of the same names
interface LeafletLayerEvents {
onbaselayerchange?: (event: Leaflet.LayersControlEvent) => void;
onoverlayadd?: (event: Leaflet.LayersControlEvent) => void;
onoverlayremove?: (event: Leaflet.LayersControlEvent) => void;
onlayeradd?: (event: Leaflet.LayerEvent) => void;
onlayerremove?: (event: Leaflet.LayerEvent) => void;
onbaselayerchange?(event: Leaflet.LayersControlEvent): void;
onoverlayadd?(event: Leaflet.LayersControlEvent): void;
onoverlayremove?(event: Leaflet.LayersControlEvent): void;
onlayeradd?(event: Leaflet.LayerEvent): void;
onlayerremove?(event: Leaflet.LayerEvent): void;
}
interface LeafletMapStateChangeEvents {
onzoomlevelschange?: (event: Leaflet.Event) => void;
onresize?: (event: Leaflet.ResizeEvent) => void;
onunload?: (event: Leaflet.Event) => void;
onviewreset?: (event: Leaflet.Event) => void;
onload?: (event: Leaflet.Event) => void;
onzoomstart?: (event: Leaflet.Event) => void;
onmovestart?: (event: Leaflet.Event) => void;
onzoom?: (event: Leaflet.Event) => void;
onmove?: (event: Leaflet.Event) => void;
onzoomend?: (event: Leaflet.Event) => void;
onmoveend?: (event: Leaflet.Event) => void;
onzoomlevelschange?(event: Leaflet.Event): void;
onresize?(event: Leaflet.ResizeEvent): void;
onunload?(event: Leaflet.Event): void;
onviewreset?(event: Leaflet.Event): void;
onload?(event: Leaflet.Event): void;
onzoomstart?(event: Leaflet.Event): void;
onmovestart?(event: Leaflet.Event): void;
onzoom?(event: Leaflet.Event): void;
onmove?(event: Leaflet.Event): void;
onzoomend?(event: Leaflet.Event): void;
onmoveend?(event: Leaflet.Event): void;
}
interface LeafletPopupEvents {
onpopupopen?: (event: Leaflet.PopupEvent) => void;
onpopupclose?: (event: Leaflet.PopupEvent) => void;
onautopanstart?: (event: Leaflet.Event) => void;
onpopupopen?(event: Leaflet.PopupEvent): void;
onpopupclose?(event: Leaflet.PopupEvent): void;
onautopanstart?(event: Leaflet.Event): void;
}
interface LeafletTooltipEvents {
ontooltipopen?: (event: Leaflet.TooltipEvent) => void;
ontooltipclose?: (event: Leaflet.TooltipEvent) => void;
ontooltipopen?(event: Leaflet.TooltipEvent): void;
ontooltipclose?(event: Leaflet.TooltipEvent): void;
}
interface LeafletLocationEvents {
onlocationerror?: (event: Leaflet.ErrorEvent) => void;
onlocationfound?: (event: Leaflet.LocationEvent) => void;
onlocationerror?(event: Leaflet.ErrorEvent): void;
onlocationfound?(event: Leaflet.LocationEvent): void;
}
interface LeafletInteractionEvents {
onclick?: (event: Leaflet.MouseEvent) => void;
ondblclick?: (event: Leaflet.MouseEvent) => void;
onmousedown?: (event: Leaflet.MouseEvent) => void;
onmouseup?: (event: Leaflet.MouseEvent) => void;
onmouseover?: (event: Leaflet.MouseEvent) => void;
onmouseout?: (event: Leaflet.MouseEvent) => void;
onmousemove?: (event: Leaflet.MouseEvent) => void;
oncontextmenu?: (event: Leaflet.MouseEvent) => void;
onkeypress?: (event: Leaflet.KeyboardEvent) => void;
onpreclick?: (event: Leaflet.MouseEvent) => void;
onclick?(event: Leaflet.MouseEvent): void;
ondblclick?(event: Leaflet.MouseEvent): void;
onmousedown?(event: Leaflet.MouseEvent): void;
onmouseup?(event: Leaflet.MouseEvent): void;
onmouseover?(event: Leaflet.MouseEvent): void;
onmouseout?(event: Leaflet.MouseEvent): void;
onmousemove?(event: Leaflet.MouseEvent): void;
oncontextmenu?(event: Leaflet.MouseEvent): void;
onkeypress?(event: Leaflet.KeyboardEvent): void;
onpreclick?(event: Leaflet.MouseEvent): void;
}
interface LeafletOtherEvents {
onzoomanim?: (event: Leaflet.ZoomAnimEvent) => void;
onzoomanim?(event: Leaflet.ZoomAnimEvent): void;
}
interface LeafletDraggingEvents {
ondragstart?: (event: Leaflet.Event) => void;
onmovestart?: (event: Leaflet.Event) => void;
ondrag?: (event: Leaflet.Event) => void;
ondragend?: (event: Leaflet.DragEndEvent) => void;
onmoveend?: (event: Leaflet.Event) => void;
ondragstart?(event: Leaflet.Event): void;
onmovestart?(event: Leaflet.Event): void;
ondrag?(event: Leaflet.Event): void;
ondragend?(event: Leaflet.DragEndEvent): void;
onmoveend?(event: Leaflet.Event): void;
}
interface MapProps extends React.HTMLProps<Map>,
@@ -92,16 +92,16 @@ export const Pane: React.ComponentClass<PaneProps>;
// There is no Layer class, these are the base props for all layers on the map
interface LayerProps extends LeafletInteractionEvents {
onadd?: (event: Leaflet.Event) => void;
onremove?: (event: Leaflet.Event) => void;
onadd?(event: Leaflet.Event): void;
onremove?(event: Leaflet.Event): void;
// Popup events
onpopupopen?: (event: Leaflet.PopupEvent) => void;
onpopupclose?: (event: Leaflet.PopupEvent) => void;
onpopupopen?(event: Leaflet.PopupEvent): void;
onpopupclose?(event: Leaflet.PopupEvent): void;
// Tooltip events
ontooltipopen?: (event: Leaflet.TooltipEvent) => void;
ontooltipclose?: (event: Leaflet.TooltipEvent) => void;
ontooltipopen?(event: Leaflet.TooltipEvent): void;
ontooltipclose?(event: Leaflet.TooltipEvent): void;
}
interface MarkerProps extends LayerProps, LeafletDraggingEvents {
@@ -129,12 +129,12 @@ interface GridLayerProps extends LayerProps {
opacity?: number;
zIndex?: number;
onloading?: (event: Leaflet.Event) => void;
ontileunload?: (event: Leaflet.TileEvent) => void;
ontileloadstart?: (event: Leaflet.TileEvent) => void;
ontileerror?: (event: Leaflet.TileErrorEvent) => void;
ontileload?: (event: Leaflet.TileEvent) => void;
onload?: (event: Leaflet.Event) => void;
onloading?(event: Leaflet.Event): void;
ontileunload?(event: Leaflet.TileEvent): void;
ontileloadstart?(event: Leaflet.TileEvent): void;
ontileerror?(event: Leaflet.TileErrorEvent): void;
ontileload?(event: Leaflet.TileEvent): void;
onload?(event: Leaflet.Event): void;
}
export const GridLayer: React.ComponentClass<GridLayerProps>;
@@ -221,8 +221,8 @@ export namespace LayersControl {
interface MapControlProps {
position?: Leaflet.ControlPosition;
}
declare class MapControl<T extends MapControlProps> extends React.Component<T, any> {
leafletElement?: L.Control
export class MapControl<T extends MapControlProps> extends React.Component<T, any> {
leafletElement?: L.Control;
}
interface ScaleControlProps {

View File

@@ -603,8 +603,7 @@ const ZoomControlExample = () => (
</Map>
);
//MapControl https://github.com/PaulLeCam/react-leaflet/issues/130
// MapControl https://github.com/PaulLeCam/react-leaflet/issues/130
const mapControlCenter: [number, number] = [51.505, -0.09];
class CenterControl extends MapControl<MapControlProps> { // note we're extending MapControl from react-leaflet, not Component from react
componentWillMount() {
@@ -612,7 +611,7 @@ class CenterControl extends MapControl<MapControlProps> { // note we're extendi
const jsx = (
// PUT YOUR JSX FOR THE COMPONENT HERE:
<div {...this.props}>
// add your JSX
// add your JSX
</div>
);
@@ -665,4 +664,4 @@ const LegendControlExample = () => (
</ul>
</LegendControl>
</Map>
);
);

View File

@@ -28,9 +28,9 @@ declare namespace ReactModal {
/* Set this to properly hide your application from assistive screenreaders and other assistive technologies while the modal is open. */
appElement?: HTMLElement | {};
/* Function that will be run after the modal has opened. */
onAfterOpen?: () => void;
onAfterOpen?(): void;
/* Function that will be run when the modal is requested to be closed, prior to actually closing. */
onRequestClose?: (event: (MouseEvent | KeyboardEvent)) => void;
onRequestClose?(event: (MouseEvent | KeyboardEvent)): void;
/* Number indicating the milliseconds to wait before closing the modal. Defaults to zero (no timeout). */
closeTimeoutMS?: number;
/* Boolean indicating if the appElement should be hidden. Defaults to true. */
@@ -48,7 +48,7 @@ declare namespace ReactModal {
/* String indicating the role of the modal, allowing the 'dialog' role to be applied if desired. */
role?: string;
/* Function that will be called to get the parent element that the modal will be attached to. */
parentSelector?: () => HTMLElement;
parentSelector?(): HTMLElement;
}
}

View File

@@ -42,4 +42,4 @@ class ExampleOfUsingReactModal extends React.Component<{}, {}> {
</ReactModal>
);
}
};
}

View File

@@ -5,32 +5,32 @@
// TypeScript Version: 2.1
import { Component } from 'react';
declare interface Modifiers_string {
default?: string,
material?: string
export interface Modifiers_string {
default?: string;
material?: string;
}
declare interface Modifiers_number {
default?: number,
material?: number
export interface Modifiers_number {
default?: number;
material?: number;
}
declare interface AnimationOptions {
duration?: number,
delay?: number,
timing?: string
export interface AnimationOptions {
duration?: number;
delay?: number;
timing?: string;
}
/*** splitter ***/
declare class SplitterSide extends Component<{
export class SplitterSide extends Component<{
side?: "left" | "right",
collapse?: "portrait" | "landscape" | boolean,
isOpen?: boolean,
onOpen?: (e?: Event) => void,
onPreOpen?: (e?: Event) => void,
onPreClose?: (e?: Event) => void,
onModeChange?: (e?: Event) => void,
onClose?: (e?: Event) => void,
onOpen?(e?: Event): void,
onPreOpen?(e?: Event): void,
onPreClose?(e?: Event): void,
onModeChange?(e?: Event): void,
onClose?(e?: Event): void,
isSwipeable?: boolean,
swipeTargetWidth?: number,
width?: number,
@@ -38,80 +38,77 @@ declare class SplitterSide extends Component<{
animationOptions?: AnimationOptions,
openThreshold?: number,
mode?: "collapse" | "split"
}, any>{ }
}, any> { }
export class SplitterContent extends Component<{}, any> { }
declare class SplitterContent extends Component<{}, any> { }
declare class Splitter extends Component<{}, any> { }
export class Splitter extends Component<{}, any> { }
/*** toolbar ***/
declare class Toolbar extends Component<{}, any>{}
export class Toolbar extends Component<{}, any> {}
declare class BottomToolbar extends Component<{
export class BottomToolbar extends Component<{
modifier?: string
}, any>{}
}, any> {}
declare class ToolbarButton extends Component<{
export class ToolbarButton extends Component<{
modifier?: string,
disabled?: boolean,
onClick?: (e?: Event) => void
}, any>{}
onClick?(e?: Event): void
}, any> {}
/*** icon ***/
declare class Icon extends Component<{
export class Icon extends Component<{
modifier?: string,
icon?: string | Modifiers_string,
size?: number | Modifiers_number,
rotate?: 90 | 180 | 270,
fixedWidth?: boolean,
spin?: boolean
}, any>{}
}, any> {}
/*** page ***/
declare class Page extends Component<{
export class Page extends Component<{
contentStyle?: any,
modifier?: string,
renderModal?: () => void,
renderToolbar?: () => void,
renderBottomToolbar?: () => void,
renderFixed?: () => void,
onInit?: () => void,
onShow?: () => void,
onHide?: () => void
}, any>{}
renderModal?(): void,
renderToolbar?(): void,
renderBottomToolbar?(): void,
renderFixed?(): void,
onInit?(): void,
onShow?(): void,
onHide?(): void
}, any> {}
/*** Grid ***/
declare class Col extends Component<{
export class Col extends Component<{
verticalAlign?: "top" | "bottom" | "center",
width?: string
}, any>{}
}, any> {}
declare class Row extends Component<{
export class Row extends Component<{
verticalAlign?: "top" | "bottom" | "center",
}, any>{}
}, any> {}
/*** Navigation ***/
declare class BackButton extends Component<{
export class BackButton extends Component<{
modifier?: string,
onClick?: (navigator: Navigator) => void
}, any>{}
onClick?(navigator: Navigator): void
}, any> {}
declare class Navigator extends Component<{
renderPage: () => any,
export class Navigator extends Component<{
renderPage(): any,
initialRouteStack?: string[],
initialRoute?: any,
onPrePush?: () => void,
onPostPush?: () => void,
onPrePop?: () => void,
onPostPop?: () => void,
onPrePush?(): void,
onPostPush?(): void,
onPrePop?(): void,
onPostPop?(): void,
animation?: "slide" | "lift" | "fade" | "none" | string,
animationOptions?: AnimationOptions
}, any>{
}, any> {
resetPage(route: any, options: any): void;
resetPageStack(route: any, options: any): void;
pushPage(route: any, options: any): void;
@@ -119,7 +116,7 @@ declare class Navigator extends Component<{
}
/*** Carousel ***/
declare class Carousel extends Component<{
export class Carousel extends Component<{
direction?: "horizontal" | "vertical",
fullscreen?: boolean,
overscrollable?: boolean,
@@ -132,19 +129,19 @@ declare class Carousel extends Component<{
disabled?: boolean,
index?: number,
autoRefresh?: boolean,
onPostChange?: () => void,
onRefresh?: () => void,
onOverscroll?: () => void
onPostChange?(): void,
onRefresh?(): void,
onOverscroll?(): void
animationOptions?: AnimationOptions
}, any>{}
}, any> {}
declare class CarouselItem extends Component<{
export class CarouselItem extends Component<{
modifier: string
}, any>{}
}, any> {}
/*** AlertDialog ***/
declare class AlertDialog extends Component<{
onCancel?: () => void,
export class AlertDialog extends Component<{
onCancel?(): void,
isOpen?: boolean,
isCancelable?: boolean,
isDisabled?: boolean,
@@ -152,14 +149,14 @@ declare class AlertDialog extends Component<{
modifier?: string,
maskColor?: string,
animationOptions?: AnimationOptions,
onPreShow?: () => void,
onPostShow?: () => void,
onPreHide?: () => void,
onPostHide?: () => void,
}, any>{}
onPreShow?(): void,
onPostShow?(): void,
onPreHide?(): void,
onPostHide?(): void,
}, any> {}
declare class Dialog extends Component<{
onCancel?: () => void,
export class Dialog extends Component<{
onCancel?(): void,
isOpen?: boolean,
isCancelable?: boolean,
isDisabled?: boolean,
@@ -167,23 +164,23 @@ declare class Dialog extends Component<{
modifier?: string,
maskColor?: string,
animationOptions?: AnimationOptions,
onPreShow?: () => void,
onPostShow?: () => void,
onPreHide?: () => void,
onPostHide?: () => void,
}, any>{}
onPreShow?(): void,
onPostShow?(): void,
onPreHide?(): void,
onPostHide?(): void,
}, any> {}
declare class Modal extends Component<{
export class Modal extends Component<{
animation?: "fade" | "none",
animationOptions?: AnimationOptions
onShow?: () => void,
onHide?: () => void,
onShow?(): void,
onHide?(): void,
isOpen?: boolean
}, any>{}
}, any> {}
declare class Popover extends Component<{
getTarget?: () => Component<any, any> | HTMLElement,
onCancel?: () => void,
export class Popover extends Component<{
getTarget?(): Component<any, any> | HTMLElement,
onCancel?(): void,
isOpen?: boolean,
isCancelable?: boolean,
isDisabled?: boolean,
@@ -191,52 +188,52 @@ declare class Popover extends Component<{
modifier?: string,
maskColor?: string,
animationOptions?: AnimationOptions,
onPreShow?: () => void,
onPostShow?: () => void,
onPreHide?: () => void,
onPostHide?: () => void,
}, any>{}
onPreShow?(): void,
onPostShow?(): void,
onPreHide?(): void,
onPostHide?(): void,
}, any> {}
declare class ProgressBar extends Component<{
export class ProgressBar extends Component<{
modifier?: string,
value?: number,
secondaryValue?: boolean,
intermediate?: boolean,
}, any> {}
declare class ProgressCircular extends Component<{
export class ProgressCircular extends Component<{
modifier?: string,
value?: number,
secondaryValue?: boolean,
intermediate?: boolean,
}, any>{}
}, any> {}
declare class Ripple extends Component<{
export class Ripple extends Component<{
color?: string,
background?: string,
disabled?: boolean,
}, any>{}
}, any> {}
/*** Forms ***/
declare class Fab extends Component<{
export class Fab extends Component<{
modifier?: string,
ripple?: boolean,
position?: string,
disabled?: boolean,
onClick?: () => void,
}, any>{}
onClick?(): void,
}, any> {}
declare class Button extends Component<{
export class Button extends Component<{
modifier?: string,
disabled?: boolean,
ripple?: boolean,
onClick?: (e?: Event) => void
}, any>{}
onClick?(e?: Event): void
}, any> {}
declare class Input extends Component<{
export class Input extends Component<{
modifier?: string,
disabled?: boolean,
onChange?: (e: Event) => void,
onChange?(e: Event): void,
value?: string,
checked?: boolean,
placeholder?: string,
@@ -245,70 +242,67 @@ declare class Input extends Component<{
float?: boolean,
}, any> {}
declare class Range extends Component<{
export class Range extends Component<{
modifier?: string,
onChange?: (e: Event) => void,
onChange?(e: Event): void,
value?: number,
disabled?: boolean,
}, any>{}
}, any> {}
declare class Switch extends Component<{
onChange?: (e: Event) => void,
export class Switch extends Component<{
onChange?(e: Event): void,
checked?: boolean,
disabled?: boolean,
inputId?: string
}, any>{}
}, any> {}
/**
* Tabs
*/
* Tabs
*/
declare class Tab extends Component<{}, any>{ }
export class Tab extends Component<{}, any> { }
declare class TabActive extends Component<{}, any>{ }
export class TabActive extends Component<{}, any> { }
declare class TabInactive extends Component<{}, any>{ }
export class TabInactive extends Component<{}, any> { }
declare class Tabbar extends Component<{
export class Tabbar extends Component<{
index?: number,
renderTabs?: () => any,
renderTabs?(): any,
position?: "bottom" | "top" | "auto",
animation: "none" | "slide" | "fade",
animationOptions?: AnimationOptions,
onPreChange?: () => void,
onPostChange?: () => void,
onReactive?: () => void,
onPreChange?(): void,
onPostChange?(): void,
onReactive?(): void,
}, any> { }
/**
* Lists
*/
* Lists
*/
declare class LazyList extends Component<{
export class LazyList extends Component<{
modifier?: string,
length?: number,
renderRow: (rowIndex: number) => any,
calculateItemHeight: (rowIndex: number) => any,
}, any>{ }
renderRow(rowIndex: number): any,
calculateItemHeight(rowIndex: number): any,
}, any> { }
declare class List extends Component<{
export class List extends Component<{
modifier?: string,
dataSource?: string[],
renderRow?: () => void,
renderHeader?: () => void,
renderFooter?: () => void,
}, any>{}
renderRow?(): void,
renderHeader?(): void,
renderFooter?(): void,
}, any> {}
declare class ListHeader extends Component<{
export class ListHeader extends Component<{
modifier?: string,
}, any>{}
}, any> {}
declare class ListItem extends Component<{
export class ListItem extends Component<{
modifier?: string,
tappable?: boolean,
tapBackgroundColor?: string,
lockOnDrag?: boolean,
}, any>{}
}, any> {}

View File

@@ -6,11 +6,9 @@ class AppState {
isOpen: boolean = false;
}
interface AppProps {
}
export class App extends React.Component<AppProps, AppState>{
interface AppProps {} // tslint:disable-line no-empty-interface
export class App extends React.Component<AppProps, AppState> {
constructor(props?: AppProps) {
super(props);
this.state = new AppState();
@@ -21,7 +19,6 @@ export class App extends React.Component<AppProps, AppState>{
}
render() {
return (
<Splitter>
<SplitterSide
@@ -42,8 +39,6 @@ export class App extends React.Component<AppProps, AppState>{
</Splitter>
);
}
}
ReactDOM.render(<App />, document.getElementById('react-body'));
ReactDOM.render(<App />, document.getElementById('react-body'));

View File

@@ -58,37 +58,36 @@ interface AffixProps {
/**
* Callback fired when the right before the `affixStyle` and `affixStyle` props are rendered
*/
onAffix?: () => void;
onAffix?(): void;
/**
* Callback fired after the component `affixStyle` and `affixClassName` props have been rendered.
*/
onAffixed?: () => void;
onAffixed?(): void;
/**
* Callback fired when the right before the `topStyle` and `topClassName` props are rendered
*/
onAffixTop?: () => void;
onAffixTop?(): void;
/**
* Callback fired after the component `topStyle` and `topClassName` props have been rendered.
*/
onAffixedTop?: () => void;
onAffixedTop?(): void;
/**
* Callback fired when the right before the `bottomStyle` and `bottomClassName` props are rendered
*/
onAffixBottom?: () => void;
onAffixBottom?(): void;
/**
* Callback fired after the component `bottomStyle` and `bottomClassName` props have been rendered.
*/
onAffixedBottom?: () => void;
onAffixedBottom?(): void;
}
export class Affix extends React.Component<AffixProps, {}> { }
// <AutoAffix />
interface AutoAffixProps extends AffixProps {
/**
* The logical container node or component for determining offset from bottom
* of viewport, or a function that returns it
@@ -155,32 +154,31 @@ interface TransitionProps {
/**
* Callback fired before the "entering" classes are applied
*/
onEnter?: (element: Element) => void;
onEnter?(element: Element): void;
/**
* Callback fired after the "entering" classes are applied
*/
onEntering?: (element: Element) => void;
onEntering?(element: Element): void;
/**
* Callback fired after the "enter" classes are applied
*/
onEntered?: (element: Element) => void;
onEntered?(element: Element): void;
/**
* Callback fired before the "exiting" classes are applied
*/
onExit?: (element: Element) => void;
onExit?(element: Element): void;
/**
* Callback fired after the "exiting" classes are applied
*/
onExiting?: (element: Element) => void;
onExiting?(element: Element): void;
/**
* Callback fired after the "exited" classes are applied
*/
onExited?: (element: Element) => void;
onExited?(element: Element): void;
}
export class Transition extends React.Component<TransitionProps, {}> { }

View File

@@ -2,7 +2,7 @@ import * as React from "react";
// <RootCloseWrapper />
interface RootCloseWrapperProps {
onRootClose?: () => void;
onRootClose?(): void;
children?: React.ReactNode;
/**

View File

@@ -17,7 +17,6 @@ function testTransition() {
);
}
class TestAffix extends React.Component<{}, {}> {
render(): JSX.Element {
return (

View File

@@ -45,7 +45,7 @@ interface ReactPaginateProps {
/**
* The method to call when a page is clicked. Exposes the current page object as an argument.
*/
onPageChange?: (selectedItem: {selected: number}) => void;
onPageChange?(selectedItem: {selected: number}): void;
/**
* The initial page selected.
@@ -110,7 +110,7 @@ interface ReactPaginateProps {
/**
* The method is called to generate the href attribute value on tag a of each page element.
*/
hrefBuilder?: (pageIndex: number) => void;
hrefBuilder?(pageIndex: number): void;
}
declare const ReactPaginate: React.ComponentClass<ReactPaginateProps>;

View File

@@ -2,7 +2,6 @@ import * as React from "react";
import ReactPaginate = require("react-paginate");
class Test extends React.Component<{}, {}> {
render() {
return (
<ReactPaginate

View File

@@ -7,7 +7,7 @@
import * as React from "react";
interface CallBackProps extends React.Props<any> {
closePortal: () => {};
closePortal(): {};
}
interface ReactPortalProps {
@@ -15,10 +15,10 @@ interface ReactPortalProps {
openByClickOn?: React.ReactElement<CallBackProps>;
closeOnEsc?: boolean;
closeOnOutsideClick?: boolean;
onOpen?: (node: HTMLDivElement) => {};
beforeClose?: (node: HTMLDivElement, resetPortalState: () => void) => {};
onClose?: () => {};
onUpdate?: () => {};
onOpen?(node: HTMLDivElement): {};
beforeClose?(node: HTMLDivElement, resetPortalState: () => void): {};
onClose?(): {};
onUpdate?(): {};
}
declare const ReactPortal: React.ComponentClass<ReactPortalProps>;

View File

@@ -4,7 +4,6 @@ import * as ReactDOM from "react-dom";
import * as Portal from "react-portal";
export default class App extends React.Component<{}, {}> {
render() {
const button1 = <button>Open portal with pseudo modal</button>;
@@ -17,10 +16,9 @@ export default class App extends React.Component<{}, {}> {
</Portal>
);
}
}
export class PseudoModal extends React.Component<{ closePortal?: () => {} }, {}> {
export class PseudoModal extends React.Component<{ closePortal?(): {} }, {}> {
render() {
return (
<div>
@@ -31,4 +29,4 @@ export class PseudoModal extends React.Component<{ closePortal?: () => {} }, {}>
}
}
ReactDOM.render(<App />, document.getElementById('react-body'));
ReactDOM.render(<App />, document.getElementById('react-body'));

View File

@@ -10,16 +10,16 @@ export = Recaptcha;
interface RecaptchaProps {
className?: string;
elementID?: string;
expiredCallback?: () => any;
expiredCallback?(): any;
expiredCallbackName?: string;
onloadCallback?: () => any;
onloadCallback?(): any;
onloadCallbackName?: string;
render?: string;
size?: string;
tabindex?: string;
theme?: "dark" | "light";
type?: string;
verifyCallback?: () => any;
verifyCallback?(): any;
verifyCallbackName?: string;
sitekey?: string;
}

View File

@@ -7,4 +7,4 @@ ReactDOM.render(
sitekey="xxxxxxxxxxxxxxxxxxxx"
/>,
document.getElementById('example')
);
);

View File

@@ -9,7 +9,7 @@ export interface SidebarProps {
contentClassName?: string;
docked?: boolean;
dragToggleDistance?: number;
onSetOpen?: () => {};
onSetOpen?(): {};
open?: boolean;
overlayClassName?: string;
pullRight?: boolean;

View File

@@ -12,7 +12,7 @@ declare namespace Scrollbar {
/**
* Pipe to scrollbar.addListener()
*/
onScroll?: (status: ScrollStatusObject, scrollbarInstance: SmoothScrollbar) => void;
onScroll?(status: ScrollStatusObject, scrollbarInstance: SmoothScrollbar): void;
/**
* Keep scrollbar tracks visible whether it's scrolling or not
* @default false
@@ -34,7 +34,6 @@ declare class Scrollbar extends React.Component<Scrollbar.ScrollbarProps, {}> {
* Scrollbar instance
*/
readonly scrollbar: SmoothScrollbar;
}
export as namespace Scrollbar;

View File

@@ -16,7 +16,7 @@ export interface StickyProps {
stickyStyle?: any;
topOffset?: number;
bottomOffset?: number;
onStickyStateChange?: (isSticky: boolean) => void;
onStickyStateChange?(isSticky: boolean): void;
}
export const Sticky: React.ComponentClass<StickyProps>;

View File

@@ -16,7 +16,7 @@ interface ReactTestRendererJSON {
$$typeof?: any;
}
interface TestRendererOptions {
createNodeMock: (element: ReactElement<any>) => any;
createNodeMock(element: ReactElement<any>): any;
}
// https://github.com/facebook/react/blob/master/src/renderers/testing/ReactTestMount.js#L155
export function create(nextElement: ReactElement<any>, options?: TestRendererOptions): Renderer;

View File

@@ -4,79 +4,79 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
export { default as Alert } from './lib/Alert'
export { default as Badge } from './lib/Badge'
export { default as Breadcrumb } from './lib/Breadcrumb'
export { default as BreadcrumbItem } from './lib/BreadcrumbItem'
export { default as Button } from './lib/Button'
export { default as ButtonDropdown } from './lib/ButtonDropdown'
export { default as ButtonGroup } from './lib/ButtonGroup'
export { default as ButtonToolbar } from './lib/ButtonToolbar'
export { default as Card } from './lib/Card'
export { default as CardBlock } from './lib/CardBlock'
export { default as CardColumns } from './lib/CardColumns'
export { default as CardDeck } from './lib/CardDeck'
export { default as CardFooter } from './lib/CardFooter'
export { default as CardGroup } from './lib/CardGroup'
export { default as CardHeader } from './lib/CardHeader'
export { default as CardImg } from './lib/CardImg'
export { default as CardImgOverlay } from './lib/CardImgOverlay'
export { default as CardLink } from './lib/CardLink'
export { default as CardSubtitle } from './lib/CardSubtitle'
export { default as CardText } from './lib/CardText'
export { default as CardTitle } from './lib/CardTitle'
export { default as Col } from './lib/Col'
export { default as Collapse } from './lib/Collapse'
export { default as Container } from './lib/Container'
export { default as Dropdown } from './lib/Dropdown'
export { default as DropdownItem } from './lib/DropdownItem'
export { default as DropdownMenu } from './lib/DropdownMenu'
export { default as DropdownToggle } from './lib/DropdownToggle'
export { default as Fade } from './lib/Fade'
export { default as Form } from './lib/Form'
export { default as FormFeedback } from './lib/FormFeedback'
export { default as FormGroup } from './lib/FormGroup'
export { default as FormText } from './lib/FormText'
export { default as Input } from './lib/Input'
export { default as InputGroup } from './lib/InputGroup'
export { default as InputGroupAddon } from './lib/InputGroupAddon'
export { default as InputGroupButton } from './lib/InputGroupButton'
export { default as Jumbotron } from './lib/Jumbotron'
export { default as Label } from './lib/Label'
export { default as ListGroup } from './lib/ListGroup'
export { default as ListGroupItem } from './lib/ListGroupItem'
export { default as ListGroupItemHeading } from './lib/ListGroupItemHeading'
export { default as ListGroupItemText } from './lib/ListGroupItemText'
export { default as Media } from './lib/Media'
export { default as Modal } from './lib/Modal'
export { default as ModalBody } from './lib/ModalBody'
export { default as ModalFooter } from './lib/ModalFooter'
export { default as ModalHeader } from './lib/ModalHeader'
export { default as Nav } from './lib/Nav'
export { default as Navbar } from './lib/Navbar'
export { default as NavbarBrand } from './lib/NavbarBrand'
export { default as NavbarToggler } from './lib/NavbarToggler'
export { default as NavDropdown } from './lib/NavDropdown'
export { default as NavItem } from './lib/NavItem'
export { default as NavLink } from './lib/NavLink'
export { default as Pagination } from './lib/Pagination'
export { default as PaginationItem } from './lib/PaginationItem'
export { default as PaginationLink } from './lib/PaginationLink'
export { default as Popover } from './lib/Popover'
export { default as PopoverContent } from './lib/PopoverContent'
export { default as PopoverTitle } from './lib/PopoverTitle'
export { default as Progress } from './lib/Progress'
export { default as Row } from './lib/Row'
export { default as TabContent } from './lib/TabContent'
export { default as Table } from './lib/Table'
export { default as TabPane } from './lib/TabPane'
export { default as Tag } from './lib/Tag'
export { default as TetherContent } from './lib/TetherContent'
export { default as Tooltip } from './lib/Tooltip'
export { default as Alert } from './lib/Alert';
export { default as Badge } from './lib/Badge';
export { default as Breadcrumb } from './lib/Breadcrumb';
export { default as BreadcrumbItem } from './lib/BreadcrumbItem';
export { default as Button } from './lib/Button';
export { default as ButtonDropdown } from './lib/ButtonDropdown';
export { default as ButtonGroup } from './lib/ButtonGroup';
export { default as ButtonToolbar } from './lib/ButtonToolbar';
export { default as Card } from './lib/Card';
export { default as CardBlock } from './lib/CardBlock';
export { default as CardColumns } from './lib/CardColumns';
export { default as CardDeck } from './lib/CardDeck';
export { default as CardFooter } from './lib/CardFooter';
export { default as CardGroup } from './lib/CardGroup';
export { default as CardHeader } from './lib/CardHeader';
export { default as CardImg } from './lib/CardImg';
export { default as CardImgOverlay } from './lib/CardImgOverlay';
export { default as CardLink } from './lib/CardLink';
export { default as CardSubtitle } from './lib/CardSubtitle';
export { default as CardText } from './lib/CardText';
export { default as CardTitle } from './lib/CardTitle';
export { default as Col } from './lib/Col';
export { default as Collapse } from './lib/Collapse';
export { default as Container } from './lib/Container';
export { default as Dropdown } from './lib/Dropdown';
export { default as DropdownItem } from './lib/DropdownItem';
export { default as DropdownMenu } from './lib/DropdownMenu';
export { default as DropdownToggle } from './lib/DropdownToggle';
export { default as Fade } from './lib/Fade';
export { default as Form } from './lib/Form';
export { default as FormFeedback } from './lib/FormFeedback';
export { default as FormGroup } from './lib/FormGroup';
export { default as FormText } from './lib/FormText';
export { default as Input } from './lib/Input';
export { default as InputGroup } from './lib/InputGroup';
export { default as InputGroupAddon } from './lib/InputGroupAddon';
export { default as InputGroupButton } from './lib/InputGroupButton';
export { default as Jumbotron } from './lib/Jumbotron';
export { default as Label } from './lib/Label';
export { default as ListGroup } from './lib/ListGroup';
export { default as ListGroupItem } from './lib/ListGroupItem';
export { default as ListGroupItemHeading } from './lib/ListGroupItemHeading';
export { default as ListGroupItemText } from './lib/ListGroupItemText';
export { default as Media } from './lib/Media';
export { default as Modal } from './lib/Modal';
export { default as ModalBody } from './lib/ModalBody';
export { default as ModalFooter } from './lib/ModalFooter';
export { default as ModalHeader } from './lib/ModalHeader';
export { default as Nav } from './lib/Nav';
export { default as Navbar } from './lib/Navbar';
export { default as NavbarBrand } from './lib/NavbarBrand';
export { default as NavbarToggler } from './lib/NavbarToggler';
export { default as NavDropdown } from './lib/NavDropdown';
export { default as NavItem } from './lib/NavItem';
export { default as NavLink } from './lib/NavLink';
export { default as Pagination } from './lib/Pagination';
export { default as PaginationItem } from './lib/PaginationItem';
export { default as PaginationLink } from './lib/PaginationLink';
export { default as Popover } from './lib/Popover';
export { default as PopoverContent } from './lib/PopoverContent';
export { default as PopoverTitle } from './lib/PopoverTitle';
export { default as Progress } from './lib/Progress';
export { default as Row } from './lib/Row';
export { default as TabContent } from './lib/TabContent';
export { default as Table } from './lib/Table';
export { default as TabPane } from './lib/TabPane';
export { default as Tag } from './lib/Tag';
export { default as TetherContent } from './lib/TetherContent';
export { default as Tooltip } from './lib/Tooltip';
export {
UncontrolledAlert,
UncontrolledButtonDropdown,
UncontrolledDropdown,
UncontrolledNavDropdown,
UncontrolledTooltip
} from './lib/Uncontrolled'
} from './lib/Uncontrolled';

View File

@@ -76,8 +76,7 @@ import {
Tooltip
} from 'reactstrap';
//--------------- Alert
// --------------- Alert
const Examplea = (props: any) => {
return (
<div>
@@ -103,7 +102,7 @@ class AlertExample extends React.Component<any, any> {
this.state = {
visible: true
}
};
}
onDismiss = () => {
@@ -127,7 +126,7 @@ function AlertExample1() {
);
}
//--------------- Badge
// --------------- Badge
class Example2 extends React.Component<any, any> {
render() {
return (
@@ -173,7 +172,7 @@ class Example4 extends React.Component<any, any> {
}
}
//------------- Breadcrumbs
// ------------- Breadcrumbs
const Example5 = (props: any) => {
return (
<div>
@@ -206,7 +205,7 @@ const Example6 = (props: any) => {
);
};
//------------- Buttons
// ------------- Buttons
class Example7 extends React.Component<any, any> {
render() {
return (
@@ -243,35 +242,35 @@ const Example9 = (
<Button color="primary" size="lg">Large Button</Button>{' '}
<Button color="secondary" size="lg">Large Button</Button>
</div>
)
);
const Example10 = (
<div>
<Button color="primary" size="sm">Small Button</Button>{' '}
<Button color="secondary" size="sm">Small Button</Button>
</div>
)
);
const Example11 = (
<div>
<Button color="primary" size="lg" block>Block level button</Button>
<Button color="secondary" size="lg" block>Block level button</Button>
</div>
)
);
const Example12 = (
<div>
<Button color="primary" size="lg" active>Primary link</Button>{' '}
<Button color="secondary" size="lg" active>Link</Button>
</div>
)
);
const Example13 = (
<div>
<Button color="primary" size="lg" disabled>Primary button</Button>{' '}
<Button color="secondary" size="lg" disabled>Button</Button>
</div>
)
);
class Example14 extends React.Component<any, any> {
constructor(props: any) {
@@ -320,7 +319,7 @@ class Example14 extends React.Component<any, any> {
}
}
//------------- Button Dropdown
// ------------- Button Dropdown
class Example15 extends React.Component<any, any> {
constructor(props: any) {
super(props);
@@ -368,7 +367,7 @@ const Example16 = (
<DropdownItem>Another Action</DropdownItem>
</DropdownMenu>
</ButtonDropdown>
)
);
const Example17 = (props: any) => (
<ButtonDropdown isOpen={true} toggle={() => true}>
@@ -382,7 +381,7 @@ const Example17 = (props: any) => (
<DropdownItem>Another Action</DropdownItem>
</DropdownMenu>
</ButtonDropdown>
)
);
const Example18 = (
<div>
@@ -406,7 +405,7 @@ const Example18 = (
</DropdownMenu>
</ButtonDropdown>
</div>
)
);
const Example19 = (
<ButtonDropdown isOpen={true} toggle={() => true} dropup>
@@ -418,11 +417,9 @@ const Example19 = (
<DropdownItem>Another Action</DropdownItem>
</DropdownMenu>
</ButtonDropdown>
)
);
//--------------- ButtonGroup
// --------------- ButtonGroup
class Example20 extends React.Component<any, any> {
render() {
return (
@@ -478,7 +475,7 @@ const Example22 = (props: any) => (
<Button>Right</Button>
</ButtonGroup>
</div>
)
);
const Example23 = (props: any) => (
<ButtonGroup>
@@ -494,8 +491,7 @@ const Example23 = (props: any) => (
</DropdownMenu>
</ButtonDropdown>
</ButtonGroup>
)
);
const Example24 = (props: any) => (
<ButtonGroup vertical>
@@ -511,10 +507,9 @@ const Example24 = (props: any) => (
</DropdownMenu>
</ButtonDropdown>
</ButtonGroup>
)
);
//------------------ Cards
// ------------------ Cards
const Example25 = (props: any) => {
return (
<div>
@@ -862,8 +857,7 @@ const Example36 = (props: any) => {
);
};
//------------------ Collapse
// ------------------ Collapse
class Example37 extends React.Component<any, any> {
constructor(props: any) {
@@ -937,8 +931,7 @@ class Example38 extends React.Component<any, any> {
}
}
//------- Dropdown
// ------- Dropdown
class Example39 extends React.Component<any, any> {
constructor(props: any) {
@@ -987,11 +980,11 @@ const Example40 = (props: any) => (
<DropdownItem>Another Action</DropdownItem>
</DropdownMenu>
</Dropdown>
)
);
const Example41 = (props: any) => (
<DropdownItem header>Header</DropdownItem>
)
);
const Example42 = (props: any) => (
<div>
@@ -1014,7 +1007,7 @@ const Example42 = (props: any) => (
</Dropdown>
</div>
)
);
class Example43 extends React.Component<any, any> {
constructor(props: any) {
@@ -1071,8 +1064,7 @@ function Example44() {
);
}
//------------------ Form
// ------------------ Form
class Example45 extends React.Component<any, any> {
render() {
return (
@@ -1476,7 +1468,7 @@ const Example53 = (props: any) => {
</InputGroup>
</div>
);
}
};
const Example54 = (props: any) => {
return (
@@ -1602,7 +1594,6 @@ const Example59 = (props: any) => {
);
};
const Example60 = (props: any) => {
return (
<div>
@@ -1933,8 +1924,7 @@ const Example71 = () => {
);
};
//--------------- Modal
// --------------- Modal
class ModalExample72 extends React.Component<any, any> {
constructor(props: any) {
super(props);
@@ -2322,7 +2312,7 @@ class Example80 extends React.Component<any, any> {
}
}
//----------- Pagination
// ----------- Pagination
class Example81 extends React.Component<any, any> {
render() {
return (
@@ -2363,7 +2353,6 @@ class Example81 extends React.Component<any, any> {
}
}
class Example82 extends React.Component<any, any> {
render() {
return (
@@ -2404,7 +2393,6 @@ class Example82 extends React.Component<any, any> {
}
}
class Example83 extends React.Component<any, any> {
render() {
return (
@@ -2465,8 +2453,7 @@ class Example84 extends React.Component<any, any> {
}
}
//------------------------- Popover
// ------------------------- Popover
class Example85 extends React.Component<any, any> {
constructor(props: any) {
super(props);
@@ -2529,7 +2516,7 @@ class PopoverItem extends React.Component<any, any> {
}
}
class PopoverExampleMulti extends React.Component<any, {popovers: {placement: string; text: string; }[]}> {
class PopoverExampleMulti extends React.Component<any, {popovers: Array<{placement: string; text: string; }>}> {
constructor(props: any) {
super(props);
@@ -2566,8 +2553,7 @@ class PopoverExampleMulti extends React.Component<any, {popovers: {placement: st
}
}
//------------------------- Progress
// ------------------------- Progress
const Example86 = (props: any) => {
return (
@@ -2711,8 +2697,7 @@ const Example92 = (props: any) => {
);
};
//--------------- Table
// --------------- Table
class Example93 extends React.Component<any, any> {
render() {
return (
@@ -3103,7 +3088,6 @@ class Example101 extends React.Component<any, any> {
}
}
class Example102 extends React.Component<any, any> {
constructor(props: any) {
super(props);
@@ -3132,7 +3116,6 @@ class Example102 extends React.Component<any, any> {
}
}
class Example103 extends React.Component<any, any> {
constructor(props: any) {
super(props);