Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously an unversioned directory inside ~/src/blockninja-themes/corporate-modernist. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
22 lines
521 B
Plaintext
22 lines
521 B
Plaintext
package main
|
|
|
|
// buttonOverrideComponent renders a Corporate Modernist styled button.
|
|
templ buttonOverrideComponent(label, href, variant string) {
|
|
if variant == "outline" || variant == "secondary" {
|
|
<a class="cm-btn-outline" href={ templ.SafeURL(href) }>
|
|
{ buttonOverrideLabel(label) }
|
|
</a>
|
|
} else {
|
|
<a class="cm-btn-primary" href={ templ.SafeURL(href) }>
|
|
{ buttonOverrideLabel(label) }
|
|
</a>
|
|
}
|
|
}
|
|
|
|
func buttonOverrideLabel(label string) string {
|
|
if label != "" {
|
|
return label
|
|
}
|
|
return "Learn more"
|
|
}
|