mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-29 00:51:29 +08:00
29 lines
634 B
TypeScript
29 lines
634 B
TypeScript
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,
|
|
onSwitching,
|
|
resistance: false,
|
|
slideStyle: style,
|
|
style,
|
|
threshold: 100
|
|
});
|
|
|
|
React.createElement(SwipeableViews, {});
|