mirror of
https://github.com/hanzoai/forum.git
synced 2026-09-30 21:51:19 +00:00
Changes made using the ember-native-class-codemod, plus some manual tweaks
23 lines
436 B
JavaScript
23 lines
436 B
JavaScript
import Component from "@ember/component";
|
|
import { action } from "@ember/object";
|
|
import { tagName } from "@ember-decorators/component";
|
|
|
|
@tagName("")
|
|
export default class Collapser extends Component {
|
|
collapsed = false;
|
|
header = null;
|
|
onToggle = null;
|
|
|
|
@action
|
|
open() {
|
|
this.set("collapsed", false);
|
|
this.onToggle?.(false);
|
|
}
|
|
|
|
@action
|
|
close() {
|
|
this.set("collapsed", true);
|
|
this.onToggle?.(true);
|
|
}
|
|
}
|