---
import { Code } from 'astro:components';
interface Props {
code: string;
/** Any Shiki language id. */
lang?: string;
/** Filename shown in the header, e.g. "src/index.ts". */
title?: string;
/** Set false to drop the copy button (e.g. for pseudo-code). */
copy?: boolean;
}
const { code, lang = 'text', title, copy = true } = Astro.props;
const trimmed = code.replace(/^\n+|\s+$/g, '');
---
{
(title || copy) && (
)
}
{/* Dual themes so light/dark both read correctly; blog.css picks per scheme. */}