mirror of
https://github.com/sern-handler/website
synced 2026-06-26 09:42:24 +00:00
20 lines
376 B
Plaintext
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>
|