vuestic-ui
vuestic-ui copied to clipboard
useConfirm composable
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".
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()