1
1
mirror of https://github.com/leon-ai/leon.git synced 2025-01-02 05:31:38 +03:00

feat(web app): kick off Aurora structure

This commit is contained in:
louistiti 2023-05-15 00:00:21 +08:00
parent 7a31158497
commit 76dfe72f5f
No known key found for this signature in database
GPG Key ID: 92CD6A2E497E1669
3 changed files with 13 additions and 6 deletions

View File

@ -1,12 +1,10 @@
import { useState } from 'react'
import { Button } from './aurora/button'
function App() {
const [count, setCount] = useState(0)
return (
<>
<button onClick={() => setCount(count + 1)}>Click me</button>
<p>hello from React. Count: {count}</p>
<p>Hello from React</p>
<Button>OK</Button>
</>
)
}

View File

@ -0,0 +1,9 @@
import type React from 'react'
interface Props {
children: React.ReactNode
}
export function Button({ children }: Props) {
return <button>{children}</button>
}

View File

@ -1,7 +1,7 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './app.tsx'
import App from './app'
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<React.StrictMode>