How to edit style facebook login button in react native?

0

I am using react-native-fbsdk. How can I change the style of the facebook login button? The component looks like this

makeLoginButton(callback) {
    return (
        <LoginButton
            style={styles.btnfacebook}
            readPermissions={["public_profile"]}
            onLoginFinished={(error, result) => {
                if (error) {
                    Crashlytics.logException('FacebookLogin: ' + error);
                } else if (result.isCancelled) {
                    //console.log("facebook login cancel")
                } else {
                    AccessToken.getCurrentAccessToken()
                        .then((data) => {
                            Answers.logLogin('Facebook', true);
                            callback(data.accessToken)
                        })
                        .catch(error => {
                            Crashlytics.logException('FacebookToken: ' + error);
                        })
                }
        }} />
    )
}

And I've tried to edit it this way

btnfacebook : {
    width: 180,
    height: 30,
    padding: 30,
    alignItems: 'center',
    justifyContent: 'center',
}

    
asked by GrizzLY Dekk 05.01.2019 в 16:27
source

0 answers