vue-metamask-tip

0.1.0 • Public • Published

vue-metamask-tip

This is a simple port from https://github.com/MetaMask/TipButton, you can use metamask tip button without any css selector like official.

Install

npm install vue-metamask-tip --save

Usage

in main.js

import Vue from 'vue';
import MetamaskTipButton from 'vue-metamask-tip';
import App from './App.vue';
 
import 'vue-metamask-tip/dist/vue-metamask-tip.css';
 
new Vue({
  el: '#app',
  components: {
    MetamaskTipButton
  },
  render: h => h(App),
});

in index.vue

<template>
  <div>
    <MetamaskTipButton
      address="0x32Be343B94f860124dC4fEe278FDCBD38C102D88"
      amount="1"
      type="1"
    ></MetamaskTipButton>
  </div>
</template>

Props

Name Type Default Description
amount String ETH amount, use string to prevent float precision issue
address String Receiver ETH wallet
type String 1 MetaMask button type

Readme

Keywords

none

Package Sidebar

Install

npm i vue-metamask-tip

Weekly Downloads

2

Version

0.1.0

License

MIT

Unpacked Size

564 kB

Total Files

24

Last publish

Collaborators

  • michael34435