2.2.2 • Published 6 years ago
bancor-conversion-widget v2.2.2
Bancor Conversion Widget
An open sourced widget that uses Bancor's smart contracts to allow a user to convert tokens or ethereum.
Features
- 🚴 Fast
- 🔧 Customizable
- 🙂 Simple usage
Installing and usage:
npm install bancor-conversion-widget --savein vanilla
<script src="https://unpkg.com/bancor-conversion-widget@latest"></script>
<body onload="render()">
<script>
const render = () => {
// render it
new BancorConversionWidget({
target: document.body,
props: {},
});
};
</script>
</body>in react
npm install react-svelte --saveimport SvelteComponent from "react-svelte";
import BancorConversionWidget from "bancor-conversion-widget";
// render it
<SvelteComponent this={BancorConversionWidget} />;in svelte
<script>
import BancorConversionWidget from "bancor-conversion-widget";
</script>
<!-- render it -->
<BancorConversionWidget />Read a more in-depth integration guide here
Available properties:
| Name | Description | Type | Default |
|---|---|---|---|
| tokenSend | initial "send" token | string | "ETH" |
| tokenReceive | initial "receive" token | string | "BNT" |
| colors | custom colors | object | src |
| showRelayTokens | show or hide relay tokens | boolean | false |
| addresses | custom registry addresses | object | src |
| affiliate.account | affiliate ethereum address | string | undefined |
| affiliate.fee | affiliate fee percentage (max 3%) | number | undefined |
| onChange | event triggered on token change | function | undefined |
Live examples:
2.2.2
6 years ago
2.2.1
6 years ago
2.2.0
6 years ago
2.1.0
6 years ago
2.0.0
6 years ago
2.0.0-rc.0
6 years ago
1.0.0
6 years ago
1.0.0-rc.4
6 years ago
1.0.0-rc.3
6 years ago
1.0.0-rc.2
6 years ago
1.0.0-rc.1
6 years ago
1.0.0-rc.0
6 years ago
1.0.0-0
6 years ago