@buildwithsygma/sygmaprotocol-react-widget
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

React Widget

Quick setup

To integrate this Widget into any React project follow this instructions below

Dependencies

You will need to add this dependency to your project first:

yarn add @polkadot/extension-inject

Installing the Widget

You can install the Widget by simply adding the dependency to your project:

yarn add @buildwithsygma/sygmaprotocol-react-widget

Code integration

After installation you can simply add the Widget into your code:

import { SygmaProtocolReactWidget } from '@buildwithsygma/sygmaprotocol-react-widget';

function MyDapp(){
  return (
    <SygmaProtocolReactWidget />;
  )
}

You can also pass props to the Widget component to customize it:

function MyDapp(){
  return (
    <SygmaProtocolReactWidget
      environment={'mainnet'}
      whitelistedSourceNetworks={["sepolia"]}
      whitelistedDestinationNetworks={["cronos"]}
      evmProvider={myEip1193Provider}
    />
  )
}

You can check here all the available properties.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.3
    20
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.3
    20
  • 0.1.2
    10

Package Sidebar

Install

npm i @buildwithsygma/sygmaprotocol-react-widget

Weekly Downloads

30

Version

0.1.3

License

LGPL-3.0-or-later

Unpacked Size

4.99 kB

Total Files

8

Last publish

Collaborators

  • buildwithsygma