diff options
Diffstat (limited to 'client/src/lib/components/button.js')
| -rw-r--r-- | client/src/lib/components/button.js | 10 |
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', |
