Basic functionality
This commit is contained in:
25
views/components/button.templ
Normal file
25
views/components/button.templ
Normal file
@ -0,0 +1,25 @@
|
||||
package components
|
||||
|
||||
templ Button() {
|
||||
<button class="w-full text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">
|
||||
{ children... }
|
||||
</button>
|
||||
}
|
||||
|
||||
templ SubmitButton() {
|
||||
<button type="submit" class="w-full text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">
|
||||
{ children... }
|
||||
</button>
|
||||
}
|
||||
|
||||
templ IconButton(icon, url string) {
|
||||
<a href={ templ.SafeURL(url) } class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-full text-sm p-2.5 text-center inline-flex items-center me-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">
|
||||
<i class={ icon }></i>
|
||||
</a>
|
||||
}
|
||||
|
||||
templ IconButtonRed(icon, url string) {
|
||||
<a hx-delete={ url } class="text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:outline-none focus:ring-red-300 font-medium rounded-full text-sm p-2.5 text-center inline-flex items-center me-2 dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-800">
|
||||
<i class={ icon }></i>
|
||||
</a>
|
||||
}
|
||||
Reference in New Issue
Block a user