Files
website/node_modules/@astrojs/starlight/user-components/TabItem.astro
2024-05-06 17:15:30 -04:00

20 lines
376 B
Plaintext

---
import { TabItemTagname } from './rehype-tabs';
import type { Icons } from '../components/Icons';
interface Props {
icon?: keyof typeof Icons;
label: string;
}
const { icon, label } = Astro.props;
if (!label) {
throw new Error('Missing prop `label` on `<TabItem>` component.');
}
---
<TabItemTagname data-label={label} data-icon={icon}>
<slot />
</TabItemTagname>