1
0
Fork 0
forked from goffee/core

id form button, redirect

This commit is contained in:
Diana 2024-11-02 20:23:48 -05:00
parent e7cc41672d
commit 6233298feb
3 changed files with 3 additions and 2 deletions

View file

@ -1,6 +1,7 @@
package components
type FormButton struct {
ID string
Text string
Icon string
IsSubmit bool

View file

@ -1,5 +1,5 @@
{{define "form_button"}}
<button class="btn btn-{{.TypeClass}}" {{if eq .IsSubmit true}}type="submit"{{else}}type="button"{{end}} {{if .IsDisabled}}disabled{{end}}>
<button class="btn btn-{{.TypeClass}}" {{ if .ID }}id="{{.ID}}"{{end}} {{if eq .IsSubmit true}}type="submit"{{else}}type="button"{{end}} {{if .IsDisabled}}disabled{{end}}>
{{.Text}}
</button>
<!-- tailwind heroicons -->