package main import ( "bytes" "context" ) // KindergartenButtonBlock renders a pill (border-radius 9999px) button with // the sticker drop-shadow effect from spec ยง9. // // Content shape (matches built-in button): {"text": "...", "href": "...", "variant": "..."}. func KindergartenButtonBlock(ctx context.Context, content map[string]any) string { label := getString(content, "text") if label == "" { // Some installs may store the label under "label" instead. label = getString(content, "label") } href := getStringDefault(content, "href", "#") variant := getStringDefault(content, "variant", "yellow") switch variant { case "red", "blue", "yellow", "green": default: variant = "yellow" } data := BigCTAData{Label: label, Href: href, ColorVariant: variant} var buf bytes.Buffer _ = kgButtonComponent(data).Render(ctx, &buf) return buf.String() }