1.0.18 • Published 5 years ago

react-metamask-login-button v1.0.18

Weekly downloads
6
License
ISC
Repository
-
Last release
5 years ago

React-MetaMask-Login-Button

image

image

This button can be used to:

  • Install MetaMask
  • Log in to MetaMak
  • Connect to the right network
  • Log in to your app

Installation

$ npm install react-metamask-login-button
or
$ yarn add react-metamask-login-button

Usage

import React,{Component} from 'react';
import MetaMaskLoginButton from 'react-metamask-login-button';
 
class App extends Component {
  constructor() {
    super();
 }
  render() {
    return (
      <div>
        <MetaMaskLoginButton />
      </div>
    );
  }
}
 
ReactDOM.render(<App />, appElement);

Optional Modifications

Optional changes to the views can be made for each component. For example the "Signed in with MetaMask screen" can be changed to a login screen for your app by making modifications to the login.js component

image

import React, { Component } from "react";
import  {Form,Button} from "react-bootstrap";
import Web3 from "web3";

export default class Login extends Component {
  constructor(props) {
    super(props);
  }

  render() {
    return (
      <div>
        <Form>
          <Form.Group controlId="formBasicEmail">
            <Form.Label>Email address</Form.Label>
            <Form.Control type="email" placeholder="Enter email" />
          </Form.Group>

          <Form.Group controlId="formBasicPassword">
            <Form.Label>Password</Form.Label>
            <Form.Control type="password" placeholder="Password" />
          </Form.Group>
          <Button variant="primary" type="submit">
            Submit
          </Button>
        </Form>
      </div>
    );
  }
}

image

1.0.18

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.1.0

5 years ago