-
Notifications
You must be signed in to change notification settings - Fork 2
/
app.js
63 lines (57 loc) · 1.46 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import { Component, h, render } from "preact";
import { useState } from "preact/hooks";
import FontContext from "./FontContext";
import AppContext from "./AppContext";
import AppHeader from "./AppHeader";
import Main from "./Main";
const App = () => {
const [font, setFont] = useState();
const [baseline, setBaseline] = useState(8);
const [size, setSize] = useState(16);
const [lead, setLead] = useState(2);
const [flow, setFlow] = useState(6);
const [ratio, setRatio] = useState("1.2");
const [length, setLength] = useState(12);
const [snap, setSnap] = useState(true);
const [grid, setGrid] = useState(false);
const [debug, setDebug] = useState(false);
const [dark, setDark] = useState(true);
const handleSnapChange = (snap) => {
if (snap) {
setLead(Math.round(lead));
}