1
0
mirror of synced 2026-05-22 18:33:15 +00:00

DEV: Convert connector file to use glimmer component (#59)

Why this change?

We've established internally that this is the better way to do things
This commit is contained in:
Alan Guo Xiang Tan
2023-10-04 16:02:30 +08:00
committed by GitHub
parent e452c049ae
commit 4ae24c6edc
2 changed files with 13 additions and 11 deletions
@@ -1,5 +1,5 @@
{{d-button
<DButton
class="btn-primary"
action=(action "showTOCOverlay")
label=(theme-prefix "table_of_contents")
}}
@action={{this.showTOCOverlay}}
@label={{theme-prefix "table_of_contents"}}
/>
@@ -1,7 +1,9 @@
export default {
actions: {
showTOCOverlay() {
document.querySelector(".d-toc-wrapper").classList.toggle("overlay");
},
},
};
import Component from "@glimmer/component";
import { action } from "@ember/object";
export default class DTocMini extends Component {
@action
showTOCOverlay() {
document.querySelector(".d-toc-wrapper").classList.toggle("overlay");
}
}