1.1.1 • Published 3 years ago

@swingby-protocol/widget v1.1.1

Weekly downloads
21
License
MIT
Repository
-
Last release
3 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

3 years ago

1.1.0

4 years ago

1.0.0

5 years ago

1.0.0-alpha.16

5 years ago

1.0.0-alpha.15

5 years ago

1.0.0-alpha.14

5 years ago

1.0.0-alpha.13

5 years ago

1.0.0-alpha.12

5 years ago

1.0.0-alpha.11

5 years ago

1.0.0-alpha.10

5 years ago

1.0.0-alpha.9

5 years ago

1.0.0-alpha.7

5 years ago

1.0.0-alpha.6

5 years ago

1.0.0-alpha.8

5 years ago

1.0.0-alpha.5

5 years ago

1.0.0-alpha.4

5 years ago

1.0.0-alpha.3

5 years ago

1.0.0-alpha.2

5 years ago

1.0.0-alpha.1

5 years ago