@@ -167,36 +167,6 @@ class Swiper extends React.Component {
167
167
}
168
168
}
169
169
170
- Swiper . propTypes = {
171
- swipeData : PropTypes . array . isRequired ,
172
- style : PropTypes . oneOfType ( [ PropTypes . array , PropTypes . object , PropTypes . number ] ) ,
173
- backgroundColor : PropTypes . string ,
174
- containerWidth : PropTypes . number ,
175
- currentSelectIndex : PropTypes . number ,
176
- leftButtonImage : Image . propTypes . source ,
177
- rightButtonImage : Image . propTypes . source ,
178
- showSwipeBtn : PropTypes . bool ,
179
- autoplay : PropTypes . bool ,
180
- autoplayTimeout : PropTypes . number ,
181
- renderSwipeItem : PropTypes . func . isRequired ,
182
- onScreenChange : PropTypes . func ,
183
- } ;
184
-
185
- Swiper . defaultProps = {
186
- style : styles . flexOne ,
187
- backgroundColor : 'white' ,
188
- containerWidth : width ,
189
- currentSelectIndex : 0 ,
190
- leftButtonImage : leftArrow ,
191
- rightButtonImage : rightArrow ,
192
- showSwipeBtn : true ,
193
- autoplayTimeout : 2500 ,
194
- autoplay : false ,
195
- onScreenChange : ( ) => { } ,
196
- } ;
197
-
198
- export default Swiper ;
199
-
200
170
const styles = StyleSheet . create ( {
201
171
swiper : {
202
172
flex : 1 ,
@@ -226,3 +196,36 @@ const styles = StyleSheet.create({
226
196
} ,
227
197
swipeBtnStyle : { fontSize : 50 , color : 'white' , justifyContent : 'center' } ,
228
198
} ) ;
199
+
200
+ Swiper . propTypes = {
201
+ swipeData : PropTypes . array . isRequired ,
202
+ style : PropTypes . oneOfType ( [ PropTypes . array , PropTypes . object , PropTypes . number ] ) ,
203
+ backgroundColor : PropTypes . string ,
204
+ containerWidth : PropTypes . number ,
205
+ currentSelectIndex : PropTypes . number ,
206
+ leftButtonImage : Image . propTypes . source ,
207
+ rightButtonImage : Image . propTypes . source ,
208
+ showSwipeBtn : PropTypes . bool ,
209
+ autoplay : PropTypes . bool ,
210
+ autoplayTimeout : PropTypes . number ,
211
+ renderSwipeItem : PropTypes . func . isRequired ,
212
+ onScreenChange : PropTypes . func ,
213
+ } ;
214
+
215
+ Swiper . defaultProps = {
216
+ style : {
217
+ flex : 1 ,
218
+ backgroundColor : 'white' ,
219
+ } ,
220
+ backgroundColor : 'white' ,
221
+ containerWidth : width ,
222
+ currentSelectIndex : 0 ,
223
+ leftButtonImage : leftArrow ,
224
+ rightButtonImage : rightArrow ,
225
+ showSwipeBtn : true ,
226
+ autoplayTimeout : 2500 ,
227
+ autoplay : false ,
228
+ onScreenChange : ( ) => { } ,
229
+ } ;
230
+
231
+ export default Swiper ;
0 commit comments