Files
gobeyhan/views/components/button.templ
Beyhan Oğur f34e54c5a5 first commit
2026-04-26 21:43:40 +03:00

17 lines
535 B
Plaintext

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>
}