@dinamicarea-vue-components/confirmation-modal
v0.1.1
Published
[![GitHub open issues](https://img.shields.io/github/issues/francisco.trillo/confirmation-modal.svg?maxAge=2592000)](https://github.com/francisco.trillo/confirmation-modal/issues) [![Npm version](https://img.shields.io/npm/v/confirmaion-modal.svg?maxAge=2
Downloads
2
Readme
confirmation-modal
Usage
<confirmation-modal ref="confirmationModal">
<template v-slot:default>
¿Estás Seguro?
</template>
</confirmation-modal>
import { ConfirmationModal } from 'confirmation-modal'
export default {
components: {
ConfirmationModal
},
methods: {
openConfirmationModal() {
this.$refs.confirmationModal.ask(() => {
// El código dentro de este callback será ejecutado si el usuario acepta
// el modal de confirmacion.
})
}
}
}
API
confirmation-modal
slots
default
props
title
String (optional)default: '¿Estás Seguro?'
ok-title
String (optional)default: 'Sí, sé lo que hago'
cancel-title
String (optional)default: 'Cancelar'
ok-variant
String (optional)default: 'danger'
cancel-variant
String (optional)default: 'secondary'
header-bg-variant
String (optional)default: 'danger'
header-text-variant
String (optional)default: 'light'
hide-header
Boolean (optional)default: false
data
callback
initial value: [object Object]
events
ok
methods
ask(callback)
onOk()
onHide()
Installation
npm install confirmation-modal
Project setup
npm install
Compiles and hot-reloads for development
npm run serve
Compiles and minifies for production
npm run build
Run your tests
npm run test
Lints and fixes files
npm run lint
Update the API section of README.md with generated documentation
npm run doc:build
Run style guide dev server
npm run styleguide
Generate a static HTML style guide
npm run styleguide:build