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

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

  • DEV: Some select-box headers don’t need a class

  • remove duplicate class

diff --git a/app/assets/javascripts/select-kit/addon/components/composer-actions.js b/app/assets/javascripts/select-kit/addon/components/composer-actions.js
index f3221e2..b518602 100644
--- a/app/assets/javascripts/select-kit/addon/components/composer-actions.js
+++ b/app/assets/javascripts/select-kit/addon/components/composer-actions.js
@@ -37,6 +37,7 @@ export default DropdownSelectBoxComponent.extend({
     filterable: false,
     showFullTitle: false,
     preventHeaderFocus: true,
+    customStyle: true,
   },
 
   @discourseComputed("isEditing", "action", "whisper", "noBump", "isInSlowMode")
diff --git a/app/assets/javascripts/select-kit/addon/components/dropdown-select-box/dropdown-select-box-header.js b/app/assets/javascripts/select-kit/addon/components/dropdown-select-box/dropdown-select-box-header.js
index c8115d4..1cb0ca1 100644
--- a/app/assets/javascripts/select-kit/addon/components/dropdown-select-box/dropdown-select-box-header.js
+++ b/app/assets/javascripts/select-kit/addon/components/dropdown-select-box/dropdown-select-box-header.js
@@ -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"),
diff --git a/app/assets/javascripts/select-kit/addon/components/period-chooser.js b/app/assets/javascripts/select-kit/addon/components/period-chooser.js
index b117b0f..c09c870 100644
--- a/app/assets/javascripts/select-kit/addon/components/period-chooser.js
+++ b/app/assets/javascripts/select-kit/addon/components/period-chooser.js
@@ -18,6 +18,7 @@ export default DropdownSelectBoxComponent.extend({
     filterable: false,
     autoFilterable: false,
     fullDay: "fullDay",
+    customStyle: true,
     headerComponent: "period-chooser/period-chooser-header",
   },
 
diff --git a/app/assets/javascripts/select-kit/addon/components/toolbar-popup-menu-options.js b/app/assets/javascripts/select-kit/addon/components/toolbar-popup-menu-options.js
index ce8cb47..250c906 100644
--- a/app/assets/javascripts/select-kit/addon/components/toolbar-popup-menu-options.js
+++ b/app/assets/javascripts/select-kit/addon/components/toolbar-popup-menu-options.js
@@ -10,6 +10,7 @@ export default DropdownSelectBoxComponent.extend({
     filterable: false,
     autoFilterable: false,
     preventHeaderFocus: true,
+    customStyle: true,
   },
 
   modifyContent(contents) {

GitHub sha: a532e643

This commit appears in #12992 which was approved by jjaffeux. It was merged by SamSaffron.