Basic functionality

This commit is contained in:
Henri Burau
2024-06-05 18:01:08 +02:00
parent 17f878f088
commit 72dce76e2b
41 changed files with 1568 additions and 176 deletions

View File

@ -0,0 +1,20 @@
package components
type FormProps struct {
Title string
Method string
Action string
SubmitText string
}
templ Form(props FormProps) {
<div class="w-full mx-auto max-w-96 p-4 bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700">
<form class="space-y-6" action={ templ.SafeURL(props.Action) } method={ props.Method }>
<h5 class="text-xl font-medium text-gray-900 dark:text-white">{ props.Title }</h5>
{ children... }
@SubmitButton() {
{ props.SubmitText }
}
</form>
</div>
}