kimkr / rn-social-buttons

Declarative social button components for React Native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Native Social Buttons

Installation

yarn add rn-social-buttons

or

npm install rn-social-buttons

Basic Usage

import React from "react";
import { View } from "react-native";
import {  
  FacebookSocialButton,
  AmazonSocialButton,
  LinkedInSocialButton,
  GoogleSocialButton,
  MicrosoftSocialButton,
  GitHubSocialButton,
  TwitterSocialButton,
  InstagramSocialButton,
  AppleSocialButton,
  OdnoklassnikiSocialButton,
  VkontakteSocialButton,
  TiktokSocialButton
} from "rn-social-buttons";

export default class App extends React.Component {
  render() {
    return (
      <View>
        <FacebookSocialButton
          onPress={() => {}} 
          buttonViewStyle={...} 
          logoStyle={...} 
          textStyle={...}
        />
      </View>
    );
  }
}

You can costumize the buttons using buttonViewStyle={...}, logoStyle={...} and textStyle={...}

Custom Usage

import React from "react";
import { View } from "react-native";
import { SocialButton } from "rn-social-buttons";

export default class App extends React.Component {
  render() {
    return (
      <View>
        <SocialButton
          iconSource={require("../images/icon.png")}
          backgroundColor={"#5181b8"}
          textColor={"#fff"}
          buttonText={"Sign in with Custom"}
          buttonViewStyle={...}
          onPress={...}
          logoStyle={...}
          textStyle={...}
        />
      </View>
    );
  }
}

show Icon only

import React from "react";
import { View } from "react-native";
import { FacebookSocialButton } from "rn-social-buttons";

export default class App extends React.Component {
  render() {
    return (
      <View>
        <FacebookSocialButton 
          onPress={() => {}} 
          buttonViewStyle={...} 
          logoStyle={...} 
          textStyle={...}
          iconOnly={true}
          size={20}
        />
      </View>
    );
  }
}

About

Declarative social button components for React Native

License:GNU General Public License v3.0


Languages

Language:JavaScript 100.0%