chore: add tailwindcss
This commit is contained in:
5 files changed
+408
-7
No files matched your search
+21
@@ -9,11 +9,21 @@ enum Level {
|
||||
function App() {
|
||||
const [greetMsg, setGreetMsg] = useState<string>("")
|
||||
const [level, setLevel] = useState<Level>(Level.min)
|
||||
const [dbInfo, setDbInfo] = useState<string>("")
|
||||
|
||||
async function getMessage() {
|
||||
setGreetMsg(await invoke("get_message", { level }))
|
||||
}
|
||||
|
||||
async function queryDatabase() {
|
||||
try {
|
||||
const result = await invoke("query_database")
|
||||
setDbInfo(result as string)
|
||||
} catch (error) {
|
||||
setDbInfo(`Error: ${error}`)
|
||||
}
|
||||
}
|
||||
|
||||
function onChange(event: React.ChangeEvent<HTMLSelectElement>) {
|
||||
const value = event.target.value as Level
|
||||
setLevel(value)
|
||||
@@ -37,6 +47,17 @@ function App() {
|
||||
</button>
|
||||
</div>
|
||||
<p>{greetMsg}</p>
|
||||
|
||||
<div className="row">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
void queryDatabase()
|
||||
}}>
|
||||
Query Database
|
||||
</button>
|
||||
</div>
|
||||
<p>{dbInfo}</p>
|
||||
</main>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
@import "tailwindcss";
|
||||
Reference in new issue
Block a user