This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/components/flat-button.js.es6
2019-11-07 15:38:28 -06:00

18 lines
421 B
JavaScript

import Component from "@ember/component";
import { default as discourseComputed } from "discourse-common/utils/decorators";
export default Component.extend({
tagName: "button",
classNames: ["btn-flat"],
attributeBindings: ["disabled", "translatedTitle:title"],
@discourseComputed("title")
translatedTitle(title) {
if (title) return I18n.t(title);
},
click() {
return this.attrs.action();
}
});