DEV: Some select-box headers don't need a class (#12992)

* DEV: Some select-box headers don't need a class

* remove duplicate class
This commit is contained in:
Kris 2021-05-20 02:00:45 -04:00 committed by GitHub
parent 626b8465ba
commit a532e64389
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 2 deletions

View File

@ -37,6 +37,7 @@ export default DropdownSelectBoxComponent.extend({
filterable: false,
showFullTitle: false,
preventHeaderFocus: true,
customStyle: true,
},
@discourseComputed("isEditing", "action", "whisper", "noBump", "isInSlowMode")

View File

@ -5,17 +5,22 @@ import { readOnly } from "@ember/object/computed";
export default SingleSelectHeaderComponent.extend({
layout,
classNames: ["btn-default", "dropdown-select-box-header"],
classNames: ["dropdown-select-box-header"],
tagName: "button",
classNameBindings: ["btnClassName"],
classNameBindings: ["btnClassName", "btnStyleClass"],
showFullTitle: readOnly("selectKit.options.showFullTitle"),
attributeBindings: ["buttonType:type"],
buttonType: "button",
customStyle: readOnly("selectKit.options.customStyle"),
btnClassName: computed("showFullTitle", function () {
return `btn ${this.showFullTitle ? "btn-icon-text" : "no-text btn-icon"}`;
}),
btnStyleClass: computed("customStyle", function () {
return `${this.customStyle ? "" : "btn-default"}`;
}),
caretUpIcon: readOnly("selectKit.options.caretUpIcon"),
caretDownIcon: readOnly("selectKit.options.caretDownIcon"),

View File

@ -18,6 +18,7 @@ export default DropdownSelectBoxComponent.extend({
filterable: false,
autoFilterable: false,
fullDay: "fullDay",
customStyle: true,
headerComponent: "period-chooser/period-chooser-header",
},

View File

@ -10,6 +10,7 @@ export default DropdownSelectBoxComponent.extend({
filterable: false,
autoFilterable: false,
preventHeaderFocus: true,
customStyle: true,
},
modifyContent(contents) {