Skip to content

Commit fe33927

Browse files
author
Shubham
committed
some mics changes
1 parent 1ef4c69 commit fe33927

File tree

3 files changed

+35
-32
lines changed

3 files changed

+35
-32
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<p align="left">
2-
<a href="https://www.npmjs.com/package/react-native-custom-swiper"><img alt="npm version" src="https://img.shields.io/badge/npm-v1.0.11-green.svg"></a>
2+
<a href="https://www.npmjs.com/package/react-native-custom-swiper"><img alt="npm version" src="https://img.shields.io/badge/npm-v1.0.13-green.svg"></a>
33
<a href="https://www.npmjs.com/package/react-native-custom-swiper"><img src="https://img.shields.io/badge/downloads-%3E1K-yellow.svg"></a>
44
<a href="https://www.npmjs.com/package/react-native-custom-swiper"<><img src="https://img.shields.io/badge/license-MIT-orange.svg"></a>
55
</p>

Swiper.js

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -167,36 +167,6 @@ class Swiper extends React.Component {
167167
}
168168
}
169169

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-
200170
const styles = StyleSheet.create({
201171
swiper: {
202172
flex: 1,
@@ -226,3 +196,36 @@ const styles = StyleSheet.create({
226196
},
227197
swipeBtnStyle: { fontSize: 50, color: 'white', justifyContent: 'center' },
228198
});
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;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-custom-swiper",
3-
"version": "1.0.11",
3+
"version": "1.0.13",
44
"description": "Custom swiper for React Native component.",
55
"main": "index.js",
66
"types": "index.d.ts",

0 commit comments

Comments
 (0)