🖲️ Lisk Buttons is a web component built using Stencil that provides you with re-usable buttons for sending Lisk payments and receiving votes.
- Put a script tag
<script src='https://unpkg.com/@lisk-builders/lisk-buttons@0.7.2/dist/liskbuttons.js'></script>
in the head of your index.html - Then you can use the element anywhere in your template, JSX, html etc.
- Run
npm install @lisk-builders/lisk-buttons --save
- Put a script tag similar to this
<script src='node_modules/lisk-buttons/dist/liskbuttons.js'></script>
in the head of your index.html - Then you can use the element anywhere in your template, JSX, html etc.
- amount: the amount of LSK the that should be sent
- recipient: the address the LSK should be sent to
- button-title: The text that appears on the button
<lisk-button-send amount=100 recipient="15015136092749848942L" button-title="Donate Me"></lisk-button-send>
- votes: the list of delegates that should be voted in
- unvotes: the list delegates that should be unvoted
- button-title: The text that appears on the button
<lisk-button-vote votes="goodDelegate1,goodDelegate2" unvotes="badDelegate1,badDelegate2" button-title="Vote"></lisk-button-vote>
- type:
'nano'
or'hub'
(optional, default is'hub'
) - source-id: id of an input field used as message source (mutual-exclusive with
'message
') - message: the message to sign (priority is given to
'source-id
') - button-title: The text that appears on the button
<lisk-button-sign type="hub" message="message to sign" button-title="Sign it!"></lisk-button-sign>
<input type="text" id="message-input" placeholder="Message...">
<lisk-button-sign type="hub" source-id="message-input" button-title="Sign it!"></lisk-button-sign>