mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
chore: website tooling (#41)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
---
|
||||
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 />}
|
||||
Reference in New Issue
Block a user