Socket
Book a DemoInstallSign in
Socket

@swingby-protocol/widget

Package Overview
Dependencies
Maintainers
4
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@swingby-protocol/widget

Small util to load Swingby's swap widget in your app.

1.1.1
latest
npmnpm
Version published
Weekly downloads
23
475%
Maintainers
4
Weekly downloads
 
Created
Source

Small util to load Swingby's swap widget in your app.

Quick start

Installation

yarn add @swingby-protocol/widget @swingby-protocol/sdk

Examples

import { createWidget, openPopup } from '@swingby-protocol/widget';

const widget = createWidget({ mode: 'test', resource: 'swap', size: 'big', bridge: 'btc_erc' });
openPopup({ widget });
import { createWidget, getHtml } from '@swingby-protocol/widget';

const widget = createWidget({ mode: 'test', resource: 'swap', size: 'banner', bridge: 'btc_erc' });
document.querySelector('#my-container').innerHTML = getHtml({ widget });

Widget sizes

⚠️ Note that both the widget and this util use rem units.

Height (assuming 1rem = 16px)
Banner76px
Small375px
Big510px

Keywords

Crypto

FAQs

Package last updated on 19 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.