-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhello-test.html
More file actions
45 lines (37 loc) · 1.42 KB
/
hello-test.html
File metadata and controls
45 lines (37 loc) · 1.42 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Hello Test</title>
<!-- React 18 -->
<script crossorigin src="https://unpkg.com/react@18/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
<!-- Babel standalone (transpiles JSX in the browser) -->
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<!-- Tailwind CSS -->
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gray-50 min-h-screen p-8">
<div id="root"></div>
<script type="text/babel">
const { useState, useEffect, useRef, useCallback, useMemo, useReducer, useContext } = React;
function App() {
const [clicked, setClicked] = useState(false);
return (
<div className="flex flex-col items-center gap-4 mt-20">
<h1 className="text-3xl font-bold text-emerald-600">Workflow test</h1>
<button
onClick={() => setClicked(true)}
className="px-6 py-3 bg-emerald-500 hover:bg-emerald-600 text-white rounded-xl font-medium transition"
>
{clicked ? "It works!" : "Click me"}
</button>
</div>
);
}
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(<App />);
</script>
</body>
</html>