workadventure/front/src/Api/iframe/Ui/ButtonDescriptor.ts

19 lines
514 B
TypeScript
Raw Normal View History

2021-09-06 14:27:54 +02:00
import type { Popup } from "./Popup";
2021-06-21 12:26:12 +02:00
export type ButtonClickedCallback = (popup: Popup) => void;
export interface ButtonDescriptor {
/**
* The label of the button
*/
2021-09-06 14:27:54 +02:00
label: string;
2021-06-21 12:26:12 +02:00
/**
* The type of the button. Can be one of "normal", "primary", "success", "warning", "error", "disabled"
*/
2021-09-06 14:27:54 +02:00
className?: "normal" | "primary" | "success" | "warning" | "error" | "disabled";
2021-06-21 12:26:12 +02:00
/**
* Callback called if the button is pressed
*/
2021-09-06 14:27:54 +02:00
callback: ButtonClickedCallback;
2021-06-21 12:26:12 +02:00
}