mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 11:34:43 +08:00
17 lines
368 B
JavaScript
17 lines
368 B
JavaScript
import Component from "@glimmer/component";
|
|
import { action } from "@ember/object";
|
|
import { service } from "@ember/service";
|
|
|
|
export default class DialogHolder extends Component {
|
|
@service dialog;
|
|
|
|
@action
|
|
async handleButtonAction(btn) {
|
|
if (btn.action && typeof btn.action === "function") {
|
|
await btn.action();
|
|
}
|
|
|
|
this.dialog.cancel();
|
|
}
|
|
}
|