go-cook-portal/views/components/bootstrap/helper.go

20 lines
321 B
Go
Raw Normal View History

2024-04-09 07:29:45 -07:00
package bootstrap
import "fmt"
func getButtonVariant(variant string) string {
if variant == "" {
return "btn"
} else {
return fmt.Sprintf("btn btn-%s", variant)
}
}
func getAlertVariant(variant string) string {
if variant == "" {
return "alert"
} else {
return fmt.Sprintf("alert alert-%s", variant)
}
}