discourse/app/assets/javascripts/select-kit/components/dropdown-select-box/dropdown-select-box-header.js.es6

17 lines
586 B
Plaintext
Raw Normal View History

import SelectKitHeaderComponent from "select-kit/components/select-kit/select-kit-header";
import discourseComputed from "discourse-common/utils/decorators";
export default SelectKitHeaderComponent.extend({
2018-06-15 23:03:24 +08:00
layoutName:
"select-kit/templates/components/dropdown-select-box/dropdown-select-box-header",
classNames: "btn-default dropdown-select-box-header",
tagName: "button",
classNameBindings: ["btnClassName"],
@discourseComputed("options.showFullTitle")
btnClassName(showFullTitle) {
return `btn ${showFullTitle ? "btn-icon-text" : "no-text btn-icon"}`;
}
});