Removing closeOnClick as it is not implemented
This commit is contained in:
parent
bb8b222c22
commit
7fddcc28f1
@ -3,8 +3,7 @@ import * as tg from "generic-type-guard";
|
|||||||
const isButtonDescriptor =
|
const isButtonDescriptor =
|
||||||
new tg.IsInterface().withProperties({
|
new tg.IsInterface().withProperties({
|
||||||
label: tg.isString,
|
label: tg.isString,
|
||||||
className: tg.isOptional(tg.isString),
|
className: tg.isOptional(tg.isString)
|
||||||
closeOnClick: tg.isOptional(tg.isBoolean)
|
|
||||||
}).get();
|
}).get();
|
||||||
|
|
||||||
export const isOpenPopupEvent =
|
export const isOpenPopupEvent =
|
||||||
|
@ -42,11 +42,7 @@ interface ButtonDescriptor {
|
|||||||
/**
|
/**
|
||||||
* Callback called if the button is pressed
|
* Callback called if the button is pressed
|
||||||
*/
|
*/
|
||||||
callback?: ButtonClickedCallback,
|
callback: ButtonClickedCallback,
|
||||||
/**
|
|
||||||
* If set to true, the popup is closed when the button is clicked
|
|
||||||
*/
|
|
||||||
closeOnClick?: boolean
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class Popup {
|
class Popup {
|
||||||
@ -109,8 +105,7 @@ window.WA = {
|
|||||||
buttons: buttons.map((button) => {
|
buttons: buttons.map((button) => {
|
||||||
return {
|
return {
|
||||||
label: button.label,
|
label: button.label,
|
||||||
className: button.className,
|
className: button.className
|
||||||
closeOnClick: button.closeOnClick
|
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
} as OpenPopupEvent
|
} as OpenPopupEvent
|
||||||
|
@ -24,7 +24,9 @@ WA.onEnterZone('popupZone', () => {
|
|||||||
{
|
{
|
||||||
label: "Close",
|
label: "Close",
|
||||||
className: "normal",
|
className: "normal",
|
||||||
closeOnClick: true
|
callback: (popup) => {
|
||||||
|
popup.close();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Next",
|
label: "Next",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user