Socket
Book a DemoInstallSign in
Socket

@swingby-protocol/widget

Package Overview
Dependencies
Maintainers
3
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.

npmnpm
Version
1.0.0-alpha.11
Version published
Weekly downloads
0
-100%
Maintainers
3
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' });
openPopup({ widget });
import { createWidget, getHtml } from '@swingby-protocol/widget';

const widget = createWidget({ mode: 'test', resource: 'swap', size: 'banner' });
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 21 Dec 2020

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