mirror of
https://github.com/discourse/discourse.git
synced 2024-12-26 05:23:44 +08:00
d1cc60c435
Changes made using the ember-native-class-codemod, plus some manual tweaks
23 lines
791 B
JavaScript
23 lines
791 B
JavaScript
import { computed } from "@ember/object";
|
|
import { reads } from "@ember/object/computed";
|
|
import {
|
|
attributeBindings,
|
|
classNames,
|
|
tagName,
|
|
} from "@ember-decorators/component";
|
|
import SelectKitHeaderComponent from "select-kit/components/select-kit/select-kit-header";
|
|
|
|
@tagName("summary")
|
|
@classNames("multi-select-header")
|
|
@attributeBindings("ariaLabel:aria-label")
|
|
export default class MultiSelectHeader extends SelectKitHeaderComponent {
|
|
@reads("selectKit.options.caretUpIcon") caretUpIcon;
|
|
@reads("selectKit.options.caretDownIcon") caretDownIcon;
|
|
@reads("selectKit.options.headerAriaLabel") ariaLabel;
|
|
|
|
@computed("selectKit.isExpanded", "caretUpIcon", "caretDownIcon")
|
|
get caretIcon() {
|
|
return this.selectKit.isExpanded ? this.caretUpIcon : this.caretDownIcon;
|
|
}
|
|
}
|