0.4.0-alpha.10 • Published 6 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
6 years ago
0.4.0-alpha.9
6 years ago
0.4.0-alpha.8
6 years ago
0.4.0-alpha.7
6 years ago
0.4.0-alpha.6
6 years ago
0.4.0-alpha.5
6 years ago
0.4.0-alpha.4
6 years ago
0.4.0-alpha.3
6 years ago
0.4.0-alpha.2
6 years ago
0.4.0-alpha.1
6 years ago
0.4.0-alpha.0
6 years ago