ButtonWithMargin.js 348 B

123456789101112131415161718
  1. import { Button as RNButton, StyleSheet, View, Platform } from 'react-native';
  2. import React from 'react';
  3. export const Button = props => (
  4. <View style={styles.margin}>
  5. <RNButton {...props} />
  6. </View>
  7. );
  8. const styles = StyleSheet.create({
  9. margin: {
  10. ...Platform.select({
  11. android: {
  12. margin: 10,
  13. },
  14. }),
  15. },
  16. });