summaryrefslogtreecommitdiffstats
path: root/assets/components/code-run.js
blob: 5ee35defb2f9bce7b15e6856d4d6f29f2fceb157 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
import { define, BaseElement, reactive } from "shared"

class CodeRun extends BaseElement {
    connectedCallback() {
        this.state = reactive({ open: false }, () => this.render())
        super.connectedCallback()
    }
    render() {
        this.toggleAttribute('open', this.state.open)
    }
}

define("code-run", CodeRun)