first commit
This commit is contained in:
16
views/components/button.templ
Normal file
16
views/components/button.templ
Normal file
@@ -0,0 +1,16 @@
|
||||
package components
|
||||
|
||||
type ButtonProps struct {
|
||||
Type string // submit, button, reset
|
||||
Label string
|
||||
Class string
|
||||
}
|
||||
|
||||
templ Button(props ButtonProps) {
|
||||
<button
|
||||
type={ props.Type }
|
||||
class={ "flex w-full justify-center rounded-md bg-indigo-600 px-3 py-1.5 text-sm font-semibold leading-6 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 " + props.Class }
|
||||
>
|
||||
{ props.Label }
|
||||
</button>
|
||||
}
|
||||
Reference in New Issue
Block a user