import {useAlert} from 'uxp/components';
alerts.show("Item updated")
alerts.show({title: "Info", content: "Item updated", cancelButtonTitle: "Ok" })
Auto close an alert (disabled by default)
alerts.show({content: 'Item updated', autoClose: true, closeAfter: 2000})
wait until alert is closed
await alerts.show("Item updated")
... execute the rest
let hasConfirmed = await alerts.confirm("Are you sure?")
if(hasConfimed) {
... execute the rest
}
alerts.confirm("Are you sure?")
.then(hasConfirmed => {
if(hasConfirmed) {
... execute the rest
}
})