summaryrefslogtreecommitdiff
path: root/client/src/lib/components/button.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2017-06-04 18:19:08 -0400
committerJules Laplace <julescarbon@gmail.com>2017-06-04 18:19:08 -0400
commit06e20cb460faa5c302511f6444c4017d5ebd07e0 (patch)
tree6b8aabe718445728b4afe22368b54f826e1a3985 /client/src/lib/components/button.js
parented91748ac4aa378bc43a1e9863dcae58ceb7f68e (diff)
more mobile hegemony
Diffstat (limited to 'client/src/lib/components/button.js')
-rw-r--r--client/src/lib/components/button.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/client/src/lib/components/button.js b/client/src/lib/components/button.js
index ca8388b..edd75de 100644
--- a/client/src/lib/components/button.js
+++ b/client/src/lib/components/button.js
@@ -30,6 +30,12 @@ export default class Button extends Component {
}
}
+const isIphone = (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))
+const isIpad = (navigator.userAgent.match(/iPad/i))
+const isAndroid = (navigator.userAgent.match(/Android/i))
+const isMobile = isIphone || isIpad || isAndroid
+const isDesktop = ! isMobile
+
const styles = StyleSheet.create({
text: {
color: '#000',
@@ -38,8 +44,8 @@ const styles = StyleSheet.create({
padding: 0,
},
button: {
- padding: 10,
- margin: 10,
+ padding: isMobile ? 5 : 10,
+ margin: isMobile ? 5 : 10,
borderRadius: 3,
backgroundColor: '#fff',
borderBottomColor: '#bbb',