From 2021c5dee03bc9dd0489251f5c327ff9c3eb2c99 Mon Sep 17 00:00:00 2001 From: Elliot S Chi Date: Tue, 9 Aug 2016 13:37:49 -0700 Subject: [PATCH] feat: add optional string prop nodeName --- react-swipeable/react-swipeable-tests.tsx | 5 +++-- react-swipeable/react-swipeable.d.ts | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/react-swipeable/react-swipeable-tests.tsx b/react-swipeable/react-swipeable-tests.tsx index dec0414759..d28d6d348b 100644 --- a/react-swipeable/react-swipeable-tests.tsx +++ b/react-swipeable/react-swipeable-tests.tsx @@ -3,7 +3,7 @@ import Swipeable = require('react-swipeable'); import React = require('react'); - + var SampleComponent = React.createClass({ render: function () { return ( @@ -18,7 +18,8 @@ var SampleComponent = React.createClass({ onSwipedDown={this.swipedDown} onSwipedLeft={this.swipedLeft} onSwiped={this.handleSwipeAction} - preventDefaultTouchmoveEvent={false}> + preventDefaultTouchmoveEvent={false} + nodeName={"swipe"}>
This element can be swiped
diff --git a/react-swipeable/react-swipeable.d.ts b/react-swipeable/react-swipeable.d.ts index 1e147a222f..db0d7b5e4f 100644 --- a/react-swipeable/react-swipeable.d.ts +++ b/react-swipeable/react-swipeable.d.ts @@ -39,6 +39,7 @@ declare namespace ReactSwipeableModule { flickThreshold?: number; delta?: number; preventDefaultTouchmoveEvent?: boolean; + nodeName?: string; } interface ReactSwipeable extends React.ComponentClass { }