xtablo-source/deprecated/internal/web/ui/helpers.go
Arthur Belleville 5d0c201e86
Some checks failed
backend-ci / Backend tests (pull_request) Failing after 53s
backend-ci / Backend tests (push) Failing after 1s
Some work
2026-05-23 17:26:01 +02:00

31 lines
405 B
Go

package ui
import "strconv"
func buttonType(value string) string {
if value == "" {
return "button"
}
return value
}
func inputType(value string) string {
if value == "" {
return "text"
}
return value
}
func inputID(id string, name string) string {
if id != "" {
return id
}
return name
}
func textareaRows(rows int) string {
if rows <= 0 {
rows = 4
}
return strconv.Itoa(rows)
}