2.0.2 • Published 11 months ago

@vemlavaraloucagamers/vg-delete-button v2.0.2

Weekly downloads
-
License
-
Repository
github
Last release
11 months ago

Vg-Delete-Button

This component is only for Vue.js 3+

npm npm Snyk Vulnerabilities for npm package Snyk Vulnerabilities for GitHub Repo

This is a component delete button.

It doesn't have any logic internally, but it returns an event when clicked.

Installation

npm install @vemlavaraloucagamers/vg-delete-button

# or

yarn add @vemlavaraloucagamers/vg-delete-button

Usage

// main.js
import { createApp } from 'vue'
import App from './App.vue'

import VgDeleteButton from '@vemlavaraloucagamers/vg-delete-button'
import "@vemlavaraloucagamers/vg-delete-button/dist/style.css";

const app = createApp(App)
app.use(VgDeleteButton)
app.mount('#app')
// page.vue
<template>
  <VgDeleteButton />
</template>

<template>
  <vg-delete-button />
</template>

<template>
  <vg-delete-button></vg-delete-button>
</template>

Props

Items with an (*) mean they are required

nameValue typeDescription
vgId (*)StringSets the id attribute to differentiate from other components
textStringDefine text button
activeBgStringDefine active background color (Hex or Color name)
activeColorStringDefine active text color (Hex or Color name)

Events

nameReturn typeDescription
clickedBooleanTriggered when the button is clicked, it returns the status (false for inactive and true for active)

Example

// page.vue
<template>
  <VgDeleteButton
    vg-id="vg-delete-button"
    text="Delete"
    activeBg="blue"
    activeColor="#E35BF9"
    @clicked="changeStatus"
  />
</template>

<script setup>
  const changeStatus = (value) => {
    console.log('clicked event: ', value)
  }

  return {
    changeStatus
  }
</script>
# console
clicked event: true

License

MIT

2.0.2

11 months ago

2.0.1

1 year ago

2.0.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago