package main import ( "bytes" "context" "git.dev.alexdunmow.com/block/core/blocks" ) // StorybookQuoteBlockMeta defines metadata for the storybook quote block. var StorybookQuoteBlockMeta = blocks.BlockMeta{ Key: "storybook_quote", Title: "Storybook Quote", Description: "Picture-book page treatment for a quote with optional illustration.", Category: blocks.CategoryContent, Source: "kindergarten", } // StorybookQuoteData is the renderer input. type StorybookQuoteData struct { Quote string Author string Illustration string } // StorybookQuoteBlock renders the quote panel. // Content shape: {quote,author,illustration}. func StorybookQuoteBlock(ctx context.Context, content map[string]any) string { data := StorybookQuoteData{ Quote: getString(content, "quote"), Author: getString(content, "author"), Illustration: getString(content, "illustration"), } var buf bytes.Buffer _ = storybookQuoteComponent(data).Render(ctx, &buf) return buf.String() }