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