2.3.0 • Published 1 year ago

todovue-label v2.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

TODOvue Label

TvLabel is a custom label component for web applications.

npm Netlify Status Pipeline npm npm GitHub GitHub Release Date

Table of Contents

Installation

Install with npm or yarn

npm install todovue-label
yarn add todovue-label

Import

import { TvLabel } from 'todovue-label'

You can also import it directly in the main.js file, so you don't have to import it in the pages

import { createApp } from "vue";
import App from "./App.vue";
import TvLabel from "todovue-label";

const app = createApp(App);
app.component("TvLabel", TvLabel);
app.mount("#app");

Usage

<template>
  <tv-label @click-label="clickHandler" color="#4FC08D">
    Vue
  </tv-label>
</template>

<script>
  import TvLabel from "todovue-label"; // Only if you have not imported it from main
  export default {
    components: {
      TvLabel // Only if you have not imported it from main
    },
    setup() {
      const clickHandler = () => {
        console.log("clicked");
      }

      return {
        clickHandler
      }
    }
  }
</script>

Props

NameTypeDefaultDescription
colorString''label color in hexadecimal
textLabelString''If you don't want to send the name by slot you can send it by property
isEditBooleanfalseIf you want to show the edit icon
isRemoveBooleanfalseIf you want to show the remove icon
iconPositionStringrightIf you want to show the icons on the left or right side of the label

Events

NameDescription
click-labelEvent that is triggered when the label is clicked

Development

Clone the repository and install the dependencies

git https://github.com/TODOvue/todovue-label.git
cd todovue-label

Install the dependencies

yarn install

Run the project

yarn demo

Run the tests

yarn test:unit

Run the linter

yarn lint

Run the build It is not necessary to generate build, since it is generated when you do PR to the master branch

yarn build

License

MIT

2.3.0

1 year ago

2.2.0

1 year ago

2.1.0

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago