Skip to content

Commit 9354c18

Browse files
committed
Rename prop to mobileTouch
1 parent d2b659e commit 9354c18

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ const component = (
227227
| startupScreen | `node` | `null` | Set's the startup screen component to be shown before the first screen is loaded. It works like a pre-loading screen. |
228228
| startup | `boolean` | `true` | Used together with `startupScreen` controls whether or not the startupScreen should auto-start. |
229229
| transitionDelay | `number` | `0` | Sets a delay in `ms` between the slide transitions. Useful if you're waiting for an exit animation to finish in the current slide. |
230-
| touch | `boolean` | `true` | When set to true activates a swipe touch effect to navigate on mobile devices. |
230+
| mobileTouch | `boolean` | `true` | When set to true activates a swipe touch effect to navigate on mobile devices. |
231231
| buttons | `boolean` | `true` | Should render the default left and right navigation buttons. |
232232
| buttonContentRight | `node` | `null` | Add content as children of the right button. |
233233
| buttonContentLeft | `node` | `null` | Add content as children of the left button. |

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ declare module 'react-awesome-slider' {
5555
startupScreen?: object;
5656
style?: object;
5757
transitionDelay?: number;
58-
touch?: boolean;
58+
mobileTouch?: boolean;
5959
}
6060

6161
export default class AwesomeSlider extends Component<

src/core/index.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default class AwesomeSlider extends React.Component {
5454
startupScreen: PropTypes.object,
5555
style: PropTypes.object,
5656
transitionDelay: PropTypes.number,
57-
touch: PropTypes.bool,
57+
mobileTouch: PropTypes.bool,
5858
};
5959

6060
static defaultProps = {
@@ -88,7 +88,7 @@ export default class AwesomeSlider extends React.Component {
8888
startupScreen: null,
8989
style: {},
9090
transitionDelay: 0,
91-
touch: true,
91+
mobileTouch: true,
9292
};
9393

9494
constructor(props) {
@@ -919,7 +919,7 @@ export default class AwesomeSlider extends React.Component {
919919
buttons,
920920
buttonContentLeft,
921921
buttonContentRight,
922-
touch
922+
mobileTouch
923923
} = this.props;
924924
const { rootElement } = this;
925925

@@ -948,9 +948,9 @@ export default class AwesomeSlider extends React.Component {
948948
this.boxA = el;
949949
}}
950950
className={this.classNames.box}
951-
onTouchStart={touch ? this.touchStart : undefined}
952-
onTouchMove={touch ? this.touchMove : undefined}
953-
onTouchEnd={touch ? this.touchEnd : undefined}
951+
onTouchStart={mobileTouch ? this.touchStart : undefined}
952+
onTouchMove={mobileTouch ? this.touchMove : undefined}
953+
onTouchEnd={mobileTouch ? this.touchEnd : undefined}
954954
>
955955
{this.state.boxA && (
956956
<Media
@@ -964,9 +964,9 @@ export default class AwesomeSlider extends React.Component {
964964
this.boxB = el;
965965
}}
966966
className={this.classNames.box}
967-
onTouchStart={touch ? this.touchStart : undefined}
968-
onTouchMove={touch ? this.touchMove : undefined}
969-
onTouchEnd={touch ? this.touchEnd : undefined}
967+
onTouchStart={mobileTouch ? this.touchStart : undefined}
968+
onTouchMove={mobileTouch ? this.touchMove : undefined}
969+
onTouchEnd={mobileTouch ? this.touchEnd : undefined}
970970
>
971971
{this.state.boxB && (
972972
<Media

0 commit comments

Comments
 (0)