Public
lbb00
html
Script
Render html by tagged templates You can use this simple function to compose components, and you can also format the content within html`` elegantly in VSCode. Example const TitleTextDefault = ':)'
const Title = (text)=> html`<h1>${text || TitleTextDefault}</h1>`
// -> "<html><body><h1>:)</h1></body></html>"
html`<html><body>${Title}</body></html>`
// -> "<html><body><h1>!</h1></body></html>"
html`<html><body>${Title('!')}</body></html>`
1
Updated: November 19, 2023