Files
DefinitelyTyped/types/react-native-swiper/react-native-swiper-tests.tsx
2017-05-04 15:48:57 -07:00

63 lines
1.2 KiB
TypeScript

import * as React from 'react';
import {
StyleSheet,
Text,
View,
ViewStyle
} from 'react-native';
import Swiper from 'react-native-swiper';
class SwiperTest extends React.Component<{}, {}> {
constructor(props: {}) {
super(props);
}
render(): React.ReactElement<any> {
return (
<Swiper
style={styles.wrapper}>
<View
style={styles.slide1}>
<Text style={styles.text}>Hello Swiper</Text>
</View>
<View
style={styles.slide2}>
<Text style={styles.text}>Beautiful</Text>
</View>
<View
style={styles.slide3}>
<Text>And Simple</Text>
</View>
</Swiper>
);
}
}
const styles = StyleSheet.create({
wrapper: {
},
slide1: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#9DD6EB'
},
slide2: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#97CAE5'
},
slide3: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#92BBD9'
},
text: {
color: '#fff',
fontSize: 30,
fontWeight: 'bold'
}
});