mirror of
https://github.com/discourse/discourse.git
synced 2024-12-05 12:13:40 +08:00
17 lines
378 B
JavaScript
17 lines
378 B
JavaScript
import Component from "@glimmer/component";
|
|
import { inject as service } from "@ember/service";
|
|
import { action } from "@ember/object";
|
|
|
|
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();
|
|
}
|
|
}
|