catppuccin/samples/svelte.svelte

32 lines
594 B
Svelte
Raw Normal View History

2023-09-22 00:22:30 +00:00
<script>
import { applyAction, enhance } from '$app/forms'
import Names from '$lib/components/names.svelte'
export let data
export let form
console.log('form: ', form)
const { names } = data
</script>
<h1>Some form</h1>
<form
method="POST"
use:enhance={({ form }) => {
return async ({ update }) => {
update()
}
}}
action="?/create"
>
<input
type="text"
placeholder="Type here"
class="input input-bordered w-full max-w-xs"
name="myText"
/>
</form>
<br />
<Names namesData={names} />