Procházet zdrojové kódy

allow external styling on Button

David před 9 roky
rodič
revize
d3d166eba6
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  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>
   );