0.12.0 • Published 1 year ago

jay-web3-connect-modal v0.12.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

jay-web3-connect-modal v0.12.0

The J-Wallet modal is an easy way to allow visitors of your react project to connect their web3 wallet and view their account and balance.

Installation

Using npm:

$ npm i -g npm
$ npm i --save jay-web3-connect-modal

Implimentation

JWallet has one prop that can be passed:

onCloseHandler accepts a function that is called when the modal close button is clicked.

Example implementation:
import React, { useState } from 'react';
import { JWallet } from 'jay-web3-connect-modal';

function App() {
  const [isOpen, setIsOpen] = useState(false);
  return (
    <>
      <h1>Demo!</h1>
      <div className='App'>Here is a bunch of information</div>
      <button onClick={() => setIsOpen(!isOpen)}>Connect Wallet</button>
      {isOpen && <JWallet onCloseHandler={() => setIsOpen(false)} />}
    </>
  );
}

export default App;

Wallet Support

  • MetaMask (supported)
  • Coinbase Wallet (coming soon)
  • Trust- Wallet (coming soon)