discourse/app/assets/javascripts/select-kit/addon/components/period-chooser/period-chooser-header.js
David Taylor d1cc60c435
DEV: Convert select-kit components to native class syntax (#28489)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-23 12:17:07 +01:00

12 lines
504 B
JavaScript

import { classNames } from "@ember-decorators/component";
import discourseComputed from "discourse-common/utils/decorators";
import DropdownSelectBoxHeaderComponent from "select-kit/components/dropdown-select-box/dropdown-select-box-header";
@classNames("period-chooser-header", "btn-flat")
export default class PeriodChooserHeader extends DropdownSelectBoxHeaderComponent {
@discourseComputed("selectKit.isExpanded")
caretIcon(isExpanded) {
return isExpanded ? "caret-up" : "caret-down";
}
}