@benev/slate
Version:
frontend web stuff
19 lines (12 loc) • 402 B
text/typescript
import {slate} from "../frontend.js"
import {css, html} from "../../nexus/html.js"
const random = () => Math.ceil(Math.random() * 1000)
export const SlateCarbon = slate.shadowComponent(use => {
use.styles(css`button { color: green }`)
const x = use.signal(random)
const randomize = () => x.value = random()
return html`
<span>${x}</span>
<button @click=${randomize}>carbon</button>
`
})