Adding a Popup object with a close() method on it.
This commit is contained in:
parent
18464e4942
commit
bb8b222c22
5 changed files with 84 additions and 37 deletions
|
@ -19,10 +19,8 @@ WA.onEnterZone('notExist', () => {
|
|||
WA.sendChatMessage("YOU SHOULD NEVER SEE THIS", 'Poly Parrot');
|
||||
})
|
||||
|
||||
let popupId;
|
||||
|
||||
WA.onEnterZone('popupZone', () => {
|
||||
popupId = WA.openPopup('foobar', 'This is a test message. Hi!', [
|
||||
WA.openPopup('foobar', 'This is a test message. Hi!', [
|
||||
{
|
||||
label: "Close",
|
||||
className: "normal",
|
||||
|
@ -31,8 +29,8 @@ WA.onEnterZone('popupZone', () => {
|
|||
{
|
||||
label: "Next",
|
||||
className: "success",
|
||||
callback: () => {
|
||||
console.log('BUTTON CLICKED')
|
||||
callback: (popup) => {
|
||||
popup.close();
|
||||
}
|
||||
}
|
||||
])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue