Files
v10/site/src/components/typography/Th.astro
T

16 lines
366 B
Plaintext

---
import type { HTMLTag, Polymorphic } from 'astro/types';
import { twMerge } from '@/utils/twMerge';
type Props<Tag extends HTMLTag = 'th'> = Polymorphic<{ as: Tag }> & {
class?: string;
};
const { as: Tag = 'th', class: className, ...props } = Astro.props;
---
<Tag class={twMerge("px-4 py-2 text-left font-bold", className)} {...props}>
<slot />
</Tag>