Kaynağa Gözat

allow external styling on Button

David 9 yıl önce
ebeveyn
işleme
d3d166eba6
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      src/components/common/Button.js

+ 2 - 2
src/components/common/Button.js

@@ -5,9 +5,9 @@ const Button = (props) => {
   const { buttonStyle, textStyle } = styles;
   const { children, onPress } = props;
   return (
-    <TouchableOpacity onPress={onPress} style={buttonStyle}>
+    <TouchableOpacity onPress={onPress} style={[buttonStyle, props.style]}>
       <Text style={textStyle}>
-        { children}
+        {children}
       </Text>
     </TouchableOpacity>
   );