features/client-side-settings #3
@ -17,7 +17,3 @@ templ BootstrapAlert(message, variant string) {
|
|||||||
{ message }
|
{ message }
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
templ BootstrapButton(message, variant string) {
|
|
||||||
<button type="button" class={ getButtonVariant(variant) }>{ message }</button>
|
|
||||||
}
|
|
10
views/components/bootstrap/button.templ
Normal file
10
views/components/bootstrap/button.templ
Normal file
@ -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>
|
||||||
|
}
|
5
views/components/bootstrap/label.templ
Normal file
5
views/components/bootstrap/label.templ
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
package bootstrap
|
||||||
|
|
||||||
|
templ Label(cssClass, name, cssForId, message string) {
|
||||||
|
<label class={ cssClass } name={ name } for={ cssForId }>{ message }</label>
|
||||||
|
}
|
13
views/components/bootstrap/switch.templ
Normal file
13
views/components/bootstrap/switch.templ
Normal file
@ -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
Block a user