Skip to content

Commit

Permalink
Add test id prop (#104)
Browse files Browse the repository at this point in the history
* feat: add test id prop

chore: bump version

* Update version

---------

Co-authored-by: Kevin Detter <[email protected]>
Co-authored-by: Bogdan Pop <[email protected]>
  • Loading branch information
3 people authored May 16, 2023
1 parent 3d5e9e7 commit 098f59c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Swiper.js
Original file line number Diff line number Diff line change
Expand Up @@ -706,10 +706,11 @@ class Swiper extends Component {
})

render = () => {
const { pointerEvents, backgroundColor, marginTop, marginBottom, containerStyle, swipeBackCard } = this.props
const { pointerEvents, backgroundColor, marginTop, marginBottom, containerStyle, swipeBackCard, testID } = this.props
return (
<View
pointerEvents={pointerEvents}
testID={testID}
style={[
styles.container,
{
Expand Down Expand Up @@ -924,6 +925,7 @@ Swiper.propTypes = {
stackSize: PropTypes.number,
swipeAnimationDuration: PropTypes.number,
swipeBackCard: PropTypes.bool,
testID: PropTypes.string,
topCardResetAnimationFriction: PropTypes.number,
topCardResetAnimationTension: PropTypes.number,
verticalSwipe: PropTypes.bool,
Expand Down
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ declare module 'react-native-deck-swiper' {
stackSize?: number;
swipeAnimationDuration?: number;
swipeBackCard?: boolean;
testID?: string;
topCardResetAnimationFriction?: number;
topCardResetAnimationTension?: number;
useViewOverflow?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-deck-swiper",
"version": "2.0.13",
"version": "2.0.14",
"description": "Awesome tinder like card swiper for react-native. Highly Customizable!",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 098f59c

Please sign in to comment.