Files
v10/website/src/components/docs/StyleCase.astro
T
2025-10-20 18:14:37 -05:00

16 lines
367 B
Plaintext

---
import type { AnySupportedStyle } from '@/types/docs';
interface Props {
styles?: AnySupportedStyle[];
}
const { styles } = Astro.props;
const { style } = Astro.params;
// Only render if current style matches, or if no styles specified (all styles)
const shouldRender = !styles || styles.includes(style as AnySupportedStyle);
---
{shouldRender && <slot />}