瀏覽代碼

allow external styling on Button

David 9 年之前
父節點
當前提交
d3d166eba6
共有 1 個文件被更改,包括 2 次插入2 次删除
  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>
   );