0.4.0-alpha.10 • Published 5 years ago
@futura/html v0.4.0-alpha.10
Futura HTML
HTML Elements for Futura.
Examples
import { button, div, attributes, events } from "@futura/html";
const { classes } = attributes;
const { onClick } = events;
type State = number;
const view = (state: State) =>
div([class_("counter")],
button([ class_("counter-button"), onClick(() => new Decrement()) ], "-"),
div([ class_("counter-value") ], `${state}`),
button([ class_("counter-button"), onClick(() => new Increment()) ], "+"),
);
Calling view(100)
will result in the following virtual DOM node:
<div class="counter">
<button class="counter-button">-</button>
<div class="counter-value">100</div>
<button class="counter-button">+</button>
</div>
0.4.0-alpha.10
5 years ago
0.4.0-alpha.9
5 years ago
0.4.0-alpha.8
5 years ago
0.4.0-alpha.7
5 years ago
0.4.0-alpha.6
5 years ago
0.4.0-alpha.5
5 years ago
0.4.0-alpha.4
5 years ago
0.4.0-alpha.3
5 years ago
0.4.0-alpha.2
5 years ago
0.4.0-alpha.1
5 years ago
0.4.0-alpha.0
5 years ago