vuestic-ui icon indicating copy to clipboard operation
vuestic-ui copied to clipboard

useConfirm composable

Open m0ksem opened this issue 2 years ago • 1 comments

Pretty basic thing:

const { showConfirm } = useConfirm()

const onDeleteButtonClick = () => {
   showConfirm({
       title: 'Are you sure',
       text: 'Deleting this item will destroy our universe',
       okText: `I don't care`
   }).then((ok) => ok && destroyUniverse())
}

Might be just wrapper around useModal.

In docs we might destroy CSS and throw a lot of errors if user click "I don't care".

m0ksem avatar Feb 14 '23 17:02 m0ksem

suggestion:

await showConfirm({
       title: 'Are you sure',
       text: 'Deleting this item will destroy our universe',
       okText: `I don't care`
})
destroyUniverse()
await showConfirm('Are you sure you want to shoot your foot?')
shootTheFoot()

asvae avatar Feb 16 '23 09:02 asvae