You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
470 B
Svelte
23 lines
470 B
Svelte
<script>
|
|
import { invoke } from "@tauri-apps/api/tauri"
|
|
|
|
let name = "";
|
|
let greetMsg = ""
|
|
|
|
async function greet(){
|
|
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
|
|
greetMsg = await invoke("greet", { name })
|
|
}
|
|
</script>
|
|
|
|
<div>
|
|
<div class="row">
|
|
<input id="greet-input" placeholder="Enter a name..." bind:value={name} />
|
|
<button on:click={greet}>
|
|
Greet
|
|
</button>
|
|
</div>
|
|
<p>{greetMsg}</p>
|
|
</div>
|
|
|