1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/discourse/components/wizard-subscription-selector/wizard-subscription-selector-header.js.es6
angusmcleod 084c6f4a7a wip
2021-09-24 17:58:42 +08:00

17 Zeilen
633 B
JavaScript

import SingleSelectHeaderComponent from "select-kit/components/select-kit/single-select-header";
import { computed } from "@ember/object";
import { reads } from "@ember/object/computed";
export default SingleSelectHeaderComponent.extend({
classNames: ["combo-box-header", "wizard-subscription-selector-header"],
caretUpIcon: reads("selectKit.options.caretUpIcon"),
caretDownIcon: reads("selectKit.options.caretDownIcon"),
caretIcon: computed(
"selectKit.isExpanded",
"caretUpIcon",
"caretDownIcon",
function () {
return this.selectKit.isExpanded ? this.caretUpIcon : this.caretDownIcon;
}
),
});