-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathapp.tsx
38 lines (34 loc) · 978 Bytes
/
app.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
import { h, tag, signal, Component } from 'omi'
import viteLogo from '/vite.svg'
import css from "./app.css?raw"
const count = signal(0)
@tag('my-app')
export default class extends Component {
static css = css
render() {
return (
<>
<div>
<a href="https://vitejs.dev" target="_blank">
<img src={viteLogo} class="logo" alt="Vite logo" />
</a>
<a href="http://omijs.org" target="_blank">
<img src="https://omi.cdn-go.cn/s/latest/omi.svg" class="logo omi" alt="Omi logo" />
</a>
</div>
<h1>Vite + Omi</h1>
<div class="card">
<button onClick={() => count.value += 1 }>
count is {count.value}
</button>
<p>
Edit <code>src/app.tsx</code> and save to test HMR
</p>
</div>
<p class="read-the-docs">
Click on the Vite and Omi logos to learn more
</p>
</>
)
}
}