npm

Need private packages and team management tools?Check out npm Orgs. »

vue-like-dislike-buttons

0.2.4 • Public • Published

vue-like-dislike-buttons

Npm version

Installation

npm install vue-like-dislike-buttons

or

yarn add vue-like-dislike-buttons

Usage

<vue-like-dislike-buttons :likes="876547" :dislikes="4567" likeChecked />
import VueLikeDislikeButtons from 'vue-like-dislike-buttons'
 
export default {
  components: {
    VueLikeDislikeButtons
  }
}

And styles:

import "vue-like-dislike-buttons/src/assets/scss/main.scss"

SCSS variables:

$color-unchecked: #a7a7a7 !default;
$color-hover: darken($color-unchecked, 15%) !default;
$checked-color: darken($color-unchecked, 25%) !default;
@import "~vue-like-dislike-buttons/src/assets/scss/main.scss"

API

like-dislike-buttons

props

  • dislike-btn-title String (optional) default: 'I don't like it'

  • dislike-checked Boolean (optional) default: false

  • dislikes Number (optional)

  • is-disabled Boolean (optional) default: false

  • like-btn-title String (optional) default: 'I like it'

  • like-checked Boolean (optional) default: false

  • likes Number (optional)

  • millions-abbreviation String (optional) default: 'M'

  • only-like Boolean (optional) default: false

  • thousands-abbreviation String (optional) default: 'K'

methods

  • computeNumber(value)

Project setup

yarn install

Compiles and hot-reloads for development

yarn serve

Compiles and minifies for production

yarn build

Run your tests

yarn test

Lints and fixes files

yarn lint

Customize configuration

See Configuration Reference.

Update the API section of README.md with generated documentation

yarn doc:build

Run style guide dev server

yarn styleguide

Generate a static HTML style guide

yarn styleguide:build

Update project version

yarn version

Keywords

install

npm i vue-like-dislike-buttons

Downloadsweekly downloads

33

version

0.2.4

license

MIT

homepage

gitlab.com

repository

Gitgitlab

last publish

collaborators

  • avatar
Report a vulnerability