mirror of
https://github.com/zoriya/v10.git
synced 2026-08-10 16:09:18 +00:00
16 lines
367 B
Plaintext
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 />}
|