mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
32 lines
718 B
TypeScript
32 lines
718 B
TypeScript
/// <reference path="react-swipeable-views.d.ts"/>
|
|
|
|
import * as React from 'react';
|
|
import SwipeableViews from 'react-swipeable-views';
|
|
|
|
const onChangeIndex = (indexNew:number, indexLatest:number) => {
|
|
console.log('New index: ' + indexNew + ', latest index' + indexLatest);
|
|
};
|
|
|
|
const onSwitching = (index:number) => {
|
|
console.log('Switching to ' + index);
|
|
};
|
|
|
|
const style:React.CSSProperties = {
|
|
height: 300
|
|
};
|
|
|
|
React.createElement(SwipeableViews, {
|
|
containerStyle: style,
|
|
disabled: false,
|
|
index: 0,
|
|
onChangeIndex: onChangeIndex,
|
|
onSwitching: onSwitching,
|
|
resistance: false,
|
|
slideStyle: style,
|
|
style: style,
|
|
threshold: 100
|
|
});
|
|
|
|
|
|
React.createElement(SwipeableViews, {});
|