summaryrefslogtreecommitdiff
path: root/client/src/lib/components/touchable.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2017-06-05 18:44:09 -0400
committerJules Laplace <julescarbon@gmail.com>2017-06-05 18:44:09 -0400
commit308ff45c1c8c16177beb0b94390d151b2ec7681d (patch)
treedc9560ccd5e25eb9c0731d4273e828e2c850d960 /client/src/lib/components/touchable.js
parent658263c5beac838240a19627894ef0621f681442 (diff)
rebuild
Diffstat (limited to 'client/src/lib/components/touchable.js')
-rw-r--r--client/src/lib/components/touchable.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/client/src/lib/components/touchable.js b/client/src/lib/components/touchable.js
index fd72c60..bfdfec3 100644
--- a/client/src/lib/components/touchable.js
+++ b/client/src/lib/components/touchable.js
@@ -2,6 +2,7 @@ import React, { Component } from 'react';
import {
TouchableOpacity,
TouchableWithoutFeedback,
+ View,
} from 'react-native';
const isIphone = (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))
@@ -14,8 +15,16 @@ const isFirefox = navigator.userAgent.match('Firefox')
export default class Touchable extends Component {
render() {
if (isFirefox) {
+ let { children, ...props } = this.props
+ if (children.length > 1) {
+ children = (
+ <View>
+ {children}
+ </View>
+ )
+ }
return (
- <TouchableWithoutFeedback {...this.props} />
+ <TouchableWithoutFeedback children={children} {...props} />
)
}
else {