mirror of
https://github.com/discourse/DiscoTOC.git
synced 2025-03-06 17:30:16 +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:
parent
e452c049ae
commit
4ae24c6edc
@ -1,5 +1,5 @@
|
|||||||
{{d-button
|
<DButton
|
||||||
class="btn-primary"
|
class="btn-primary"
|
||||||
action=(action "showTOCOverlay")
|
@action={{this.showTOCOverlay}}
|
||||||
label=(theme-prefix "table_of_contents")
|
@label={{theme-prefix "table_of_contents"}}
|
||||||
}}
|
/>
|
@ -1,7 +1,9 @@
|
|||||||
export default {
|
import Component from "@glimmer/component";
|
||||||
actions: {
|
import { action } from "@ember/object";
|
||||||
|
|
||||||
|
export default class DTocMini extends Component {
|
||||||
|
@action
|
||||||
showTOCOverlay() {
|
showTOCOverlay() {
|
||||||
document.querySelector(".d-toc-wrapper").classList.toggle("overlay");
|
document.querySelector(".d-toc-wrapper").classList.toggle("overlay");
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user