mirror of
https://github.com/taigrr/wails.git
synced 2026-04-17 12:15:02 -07:00
18 lines
377 B
Svelte
18 lines
377 B
Svelte
<script>
|
|
import { getContext } from 'svelte';
|
|
import ModalContent from './ModalContent.svelte'
|
|
|
|
const { open } = getContext('simple-modal');
|
|
|
|
const handleOpenModal = () => {
|
|
window.backend.basic().then((result) => {
|
|
open(ModalContent, { message: result });
|
|
});
|
|
};
|
|
</script>
|
|
|
|
<main>
|
|
<p><button on:click={handleOpenModal}>Hello</button></p>
|
|
</main>
|
|
|
|
<style></style> |