-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.tsx
44 lines (41 loc) · 1.89 KB
/
test.tsx
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
import { Show, createSignal } from "solid-js"
export default function Test() {
const [count, setCount] = createSignal(0)
const [hidden, setHidden] = createSignal(false)
const getButtonText = () => {
const v = count()
return v > 0 ? `Clicked ${v} times!` : 'Click me!'
}
return (
<Show when={!hidden()} >
<div class="pengu-test-overlay">
<div class="pengu-test-container">
<div class="pengu-test-image" />
<div class="pengu-test-left-container">
<h1 class="pengu-test-title">
Pengu Loader
<span style="color: red; padding-left: 5px; padding-right: 5px;" class="emoji">❤</span>
Vite
</h1>
<p class="pengu-test-content">
<Show when={process.env.DEV} fallback={
<>
Run template in dev mode to see HMR in action!<br />
</>
}>
You can change CSS and TSX in real-time<br />
without having to reload LCU at all!<br />
Try it now by editing CSS at src/index.css<br />
or TSX at src/index.tsx!
</Show>
</p>
<div class="pengu-test-button-container">
<button class="pengu-test-button" onClick={() => setCount(count() + 1)}>{getButtonText()}</button>
<button class="pengu-test-button" onClick={() => setHidden(true)}>Close</button>
</div>
</div>
</div>
</div>
</Show>
)
}