1.1.1 • Published 2 years ago

@swingby-protocol/widget v1.1.1

Weekly downloads
21
License
MIT
Repository
-
Last release
2 years ago

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
1.1.1

2 years ago

1.1.0

3 years ago

1.0.0

3 years ago

1.0.0-alpha.16

3 years ago

1.0.0-alpha.15

3 years ago

1.0.0-alpha.14

3 years ago

1.0.0-alpha.13

3 years ago

1.0.0-alpha.12

3 years ago

1.0.0-alpha.11

3 years ago

1.0.0-alpha.10

3 years ago

1.0.0-alpha.9

3 years ago

1.0.0-alpha.7

3 years ago

1.0.0-alpha.6

3 years ago

1.0.0-alpha.8

3 years ago

1.0.0-alpha.5

3 years ago

1.0.0-alpha.4

3 years ago

1.0.0-alpha.3

3 years ago

1.0.0-alpha.2

3 years ago

1.0.0-alpha.1

3 years ago