Skip to content

Commit

Permalink
add check for touchable (#73)
Browse files Browse the repository at this point in the history
* add check for android for touchable

* review changes
  • Loading branch information
l3satwik authored and ritz078 committed May 30, 2019
1 parent 947029f commit cee8a89
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/Controls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import {
View,
StyleSheet,
TouchableWithoutFeedback,
TouchableNativeFeedback
TouchableNativeFeedback,
Platform
} from "react-native";
import { ControlsProps } from "./typings/Controls";
import Text from "./Text";
Expand Down Expand Up @@ -112,9 +113,10 @@ export default class extends React.PureComponent<ControlsProps> {
renderLabel
} = this.props;

const Touchable = ripple
? TouchableNativeFeedback
: TouchableWithoutFeedback;
const Touchable =
ripple && Platform.OS === "android"
? TouchableNativeFeedback
: TouchableWithoutFeedback;
return (
<View style={[styles.wrapper, style.wrapper]}>
{data.map(item => {
Expand Down

0 comments on commit cee8a89

Please sign in to comment.