--- /** * ============================================================ * SVGarden — https://www.svgarden.dev * Author : Simon-Pierre Boucher * Contact: contact@spboucher.ai * File : src/components/CodeBlock.astro * Desc : Shiki-highlighted code panel with Copy + Download buttons * ============================================================ */ import { Code } from 'astro:components'; interface Props { code: string; // displayed AND copied — includes the attribution header label: string; // e.g. snippets/loaders/spinner-dash.html downloadName?: string; // e.g. spinner-dash.html — omits the Download button if absent } const { code, label, downloadName } = Astro.props; ---
Code {label} {downloadName && ( )}