vue-confirm-button-gmlo

0.1.4 • Public • Published

VueConfirmButton

Introduction

Button to request confirm before execute an action using SweetAlert2

Installation

npm i --save vue-confirm-button-gmlo

Usage

import VueConfirmButton from "vue-confirm-button-gmlo";

Vue.component('VueConfirmButton', VueConfirmButton);
<vue-confirm-button dialog-title="Do you confirm delete this item?">Delete</vue-confirm-button>

Props

Props Type Required Default
dialog-title String yes -
dialog-text String no -
confirm-button-text String no "Yes"
cancel-button-text String no "Cancel"

You can inherit attributes directly to the button, example:

<!-- Use bootstrap classes on button and disabled-->
<vue-confirm-button class="btn btn-danger" disabled dialog-title="Do you confirm delete this item?">Delete</vue-confirm-button>

Events

Event Description
confirmed When the user to click on confirm button
canceled When the user to click on cancel button or exit from the dialog

License

MIT

Package Sidebar

Install

npm i vue-confirm-button-gmlo

Weekly Downloads

1

Version

0.1.4

License

MIT

Unpacked Size

30.3 kB

Total Files

7

Last publish

Collaborators

  • gmlo89