themes-coffee/button_override.go
Alex Dunmow 11c6c8c63e initial: theme plugin coffee
Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously
an unversioned directory inside ~/src/blockninja-themes/coffee.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 14:11:22 +08:00

19 lines
506 B
Go

package main
import (
"bytes"
"context"
)
// CoffeeButtonBlock renders a button with the kraft-tag override styling.
// Content shape: {"text": "Click me", "url": "...", "variant": "primary|secondary"}
func CoffeeButtonBlock(ctx context.Context, content map[string]any) string {
text := getString(content, "text")
url := getString(content, "url")
variant := getString(content, "variant")
var buf bytes.Buffer
_ = coffeeButtonComponent(text, url, variant).Render(ctx, &buf)
return buf.String()
}