title: Custom button Component in React Native is not accepting props
body: <p>I made a custom Button(component) in react native to use it in the whole app with required parametric values(color,title,onPress funtion etc) but it's not accepting the values,I'm passing on calling</p>
  
  <p>here's my button class</p>
  
  <pre><code>import React from 'react';
  import {Button,Text} from 'react-native';
  export const CustomButton = ({btnTitle, btnBgColor,btnPress}) =&gt;
  (
  
      &lt;Button
          title={btnTitle}
  
          style={
              {
                  width:'200',
                  height:'40',
                  padding:10,
                  marginTop:20,
                  backgroundColor:'btnBgColor',
          }}
  
          onPress = {btnPress}&gt;
      &lt;/Button&gt;
  );
  </code></pre>
  
  <p>here I'm using it </p>
  
  <pre><code>export class Login extends Component&lt;Props&gt; {
  render() {
      return(
          &lt;View style={styles.containerStyle}&gt;
              &lt;ImageBackground source={require ('./../../assets/images/bg.jpg')}
                               style={styles.bgStyle}/&gt;
  
              &lt;View style={styles.loginAreaViewStyle}&gt;
  
                  &lt;Image /&gt;
  
                  &lt;CustomInputField
                      inputPlaceholder={'Email'}
                      userChoice_TrF={false}
  
                  /&gt;
                  &lt;CustomInputField
                      inputPlaceholder={'Password'}
                      userChoice_TrF={true}
  
                  /&gt;
  
             &lt;CustomButton
                  btnTitle={'Login'}
                  btnBgColor={'black'}
                  btnPress={this._LoginFunction()}/&gt;
  
  
          &lt;/View&gt;
          &lt;/View&gt;
      );
  }
  
  _LoginFunction()
  {
      return(alert('Login successful'))
  
  }}
  </code></pre>
  
  <p>here's outn put<a href="https://i.stack.imgur.com/AgzIE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AgzIE.png" alt=""></a></p>
  
  <p>you can see my parametric values, color,widh,height etc made no effect on button</p>