1.0.23 • Published 4 years ago

@shardlabs/kusama-tips-widget v1.0.23

Weekly downloads
74
License
Apache-2.0
Repository
github
Last release
4 years ago

Kusama Tips Widget

Install

Using CDN: Add the following script to the end of your <head> section.

<script src="https://unpkg.com/@shardlabs/kusama-tips-widget@latest/dist/bundle.min.js"></script>

Usage

Binding the widget:

kusamaTipsWidget.bind(target, options)

Minimal example:

<script>
  kusamaTipsWidget.bind(document.body, {
    beneficiary: "5EhR5PRsX...",
  });
</script>

Use custom button element:

<script>
  kusamaTipsWidget.bind(document.body, {
    beneficiary: "5EhR5PRsX...",
    element: document.getElementById("my-button"),
  });
</script>

You can disable proposals by passing allowProposing: false to the options object:

<script>
  kusamaTipsWidget.bind(document.body, {
    beneficiary: "5EhR5PRsX...",
    buttonText: "Donate KSM",
    allowProposing: false,
  });
</script>

Options

PropertyDescriptionRequiredDefault
beneficiaryThe account to be credited with the assets. Use your substrate address here.Yes-
elementA custom DOM element on which a click handler will be registered.No-
buttonTextA custom text for the button if the default value does not fit your use case.NoKusama Tips
allowProposingA flag to control tip proposing. This flag can be set to false in cases where tip proposing is not desired or should not be allowed. Tip proposing is allowed by default.Notrue
1.0.22

4 years ago

1.0.23

4 years ago

1.0.21

4 years ago

1.0.19

4 years ago

1.0.20

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago