deno.land / x / lume@v2.1.4 / tests / assets / nunjucks / _components / Button.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
interface Props { content: string; className?: string;}
export default function ({ content, className }: Props) { return `<button class="${className || ""}" type="button">${content}</button>`;}
export const css = `button { background-color: blue;}`;
export const js = `document.querySelectorAll("button").forEach(button => { button.addEventListener("click", () => { alert("Hello world!"); });});`;
lume

Version Info

Tagged at
7 months ago