2024-07-09 08:32:24 -07:00
|
|
|
package bulma
|
|
|
|
|
2024-07-11 08:08:58 -07:00
|
|
|
// This creates a button that accepts children under it.
|
|
|
|
templ Button() {
|
|
|
|
<button type="button" class={ "button" }>
|
|
|
|
{ children... }
|
|
|
|
</button>
|
|
|
|
}
|
|
|
|
|
|
|
|
// Used to create a button and lets you define the color.
|
|
|
|
// Accepts children.
|
|
|
|
templ ButtonColor(color string) {
|
|
|
|
<button type="button" class={ "button", color }>
|
2024-07-09 08:32:24 -07:00
|
|
|
{ children... }
|
|
|
|
</button>
|
|
|
|
}
|
|
|
|
|
|
|
|
templ ButtonNewTab(url, text string) {
|
|
|
|
<button type="button" class="button">
|
|
|
|
<a href={ templ.SafeURL(url) } target="_blank" rel="noopener noreferrer">{ text }</a>
|
|
|
|
</button>
|
|
|
|
}
|
|
|
|
|
|
|
|
templ ALink(url, title string) {
|
|
|
|
<a href={ templ.SafeURL(url) }>{ title }</a>
|
|
|
|
}
|
|
|
|
|
|
|
|
templ ANewTab(url, text string) {
|
|
|
|
<a href={ templ.SafeURL(url) } target="_blank" rel="noopener noreferrer">{ text }</a>
|
|
|
|
}
|