mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 02:23:40 +08:00
24 lines
812 B
JavaScript
24 lines
812 B
JavaScript
import SelectKitHeaderComponent from "select-kit/components/select-kit/select-kit-header";
|
|
import layout from "select-kit/templates/components/multi-select/multi-select-header";
|
|
import { computed } from "@ember/object";
|
|
import { reads } from "@ember/object/computed";
|
|
|
|
export default SelectKitHeaderComponent.extend({
|
|
tagName: "summary",
|
|
classNames: ["multi-select-header"],
|
|
attributeBindings: ["ariaLabel:aria-label"],
|
|
layout,
|
|
|
|
caretUpIcon: reads("selectKit.options.caretUpIcon"),
|
|
caretDownIcon: reads("selectKit.options.caretDownIcon"),
|
|
ariaLabel: reads("selectKit.options.headerAriaLabel"),
|
|
caretIcon: computed(
|
|
"selectKit.isExpanded",
|
|
"caretUpIcon",
|
|
"caretDownIcon",
|
|
function () {
|
|
return this.selectKit.isExpanded ? this.caretUpIcon : this.caretDownIcon;
|
|
}
|
|
),
|
|
});
|