cleaned up the current bootstrap components
This commit is contained in:
parent
03d151f75a
commit
9d88d649d1
|
@ -17,7 +17,3 @@ templ BootstrapAlert(message, variant string) {
|
|||
{ message }
|
||||
</div>
|
||||
}
|
||||
|
||||
templ BootstrapButton(message, variant string) {
|
||||
<button type="button" class={ getButtonVariant(variant) }>{ message }</button>
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package bootstrap
|
||||
|
||||
const (
|
||||
ButtonTypeSubmit = "submit"
|
||||
ButtonTypeDefault = "button"
|
||||
)
|
||||
|
||||
templ BootstrapButton(message, variant, buttonType string) {
|
||||
<button type={ buttonType } class={ getButtonVariant(variant) }>{ message }</button>
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
package bootstrap
|
||||
|
||||
templ Label(cssClass, name, cssForId, message string) {
|
||||
<label class={ cssClass } name={ name } for={ cssForId }>{ message }</label>
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package bootstrap
|
||||
|
||||
const (
|
||||
SwitchTypeCheckbox = "checkbox"
|
||||
)
|
||||
|
||||
templ Switch(name, switchType, cssId string, enabled bool) {
|
||||
if enabled == true {
|
||||
<input class="form-check-input" name={ name } type={ switchType } role="switch" id={ cssId } checked/>
|
||||
} else {
|
||||
<input class="form-check-input" name={ name } type={ switchType } role="switch" id={ cssId }/>
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue