discourse/app/assets/javascripts/dialog-holder/addon/components/dialog-holder.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
368 B
JavaScript
Raw Normal View History

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();
}
}