1.0.23 • Published 3 years ago

@shardlabs/kusama-tips-widget v1.0.23

Weekly downloads
74
License
Apache-2.0
Repository
github
Last release
3 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

3 years ago

1.0.23

3 years ago

1.0.21

3 years ago

1.0.19

3 years ago

1.0.20

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago