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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/** @jsxImportSource https://esm.sh/react */
import React, { useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
const popularCombos = [
{ name: "Alphabet", text: "abcde fghijk lmnop qrstu vwxyz" },
{ name: "Numbers", text: "0123456789" },
{ name: "Symbols", text: "!@#$%^&*()_+-=[]{}|;:,.<>?" },
{ name: "Pangram", text: "The quick brown fox jumps over the lazy dog" },
];
const fontOptions = [
"Code Pro Light",
"ET Book",
"IBM Plex Mono",
"Inter",
"Roboto",
"Lora",
"Playfair Display",
"Montserrat",
"Open Sans",
"Fira Sans",
];
const colorThemes = [
{ name: "Default", bg: "#000", text: "#ddd" },
{ name: "Light", bg: "#fff", text: "#000" },
{ name: "Blue", bg: "#001f3f", text: "#7FDBFF" },
{ name: "Green", bg: "#2ECC40", text: "#001f3f" },
{ name: "Red", bg: "#FF4136", text: "#FFDC00" },
{ name: "Purple", bg: "#B10DC9", text: "#F012BE" },
{ name: "Orange", bg: "#FF851B", text: "#0074D9" },
{ name: "Gray", bg: "#AAAAAA", text: "#111111" },
{ name: "Teal", bg: "#39CCCC", text: "#001f3f" },
{ name: "Olive", bg: "#3D9970", text: "#01FF70" },
];
function App() {
const [customText, setCustomText] = useState("abcde fghijk lmnop qrstu vwxyz");
const [font, setFont] = useState("all font");
const [theme, setTheme] = useState(colorThemes[0]);
return (
<div style={{ backgroundColor: theme.bg, color: theme.text }}>
<header>
all fonts
<span className="header-number">val.town</span>
</header>
<div className="pill-container">
{popularCombos.map((combo, index) => (
<button
key={index}
className="pill"
onClick={() => setCustomText(combo.text)}
>
{combo.name}
</button>
))}
</div>
<div className="pill-container">
{fontOptions.map((fontOption, index) => (
<button
key={index}
className="pill"
onClick={() => setFont(fontOption)}
>
{fontOption}
</button>
))}
</div>
<div className="pill-container">
{colorThemes.map((colorTheme, index) => (
<button
key={index}
className="pill"
onClick={() => setTheme(colorTheme)}
style={{ backgroundColor: colorTheme.bg, color: colorTheme.text }}
>
{colorTheme.name}
</button>
))}
</div>
<article style={{ fontFamily: font }}>{customText}</article>
<div className="input-container">
<input
type="text"
id="customText"
placeholder="Enter custom text"
value={customText}
onChange={(e) => setCustomText(e.target.value)}
style={{ backgroundColor: theme.bg, color: theme.text }}
/>
</div>
<footer>