mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
15 lines
354 B
Plaintext
15 lines
354 B
Plaintext
---
|
|
import type { HTMLTag, Polymorphic } from 'astro/types';
|
|
import { twMerge } from 'tailwind-merge';
|
|
|
|
type Props<Tag extends HTMLTag = 'td'> = Polymorphic<{ as: Tag }> & {
|
|
class?: string;
|
|
};
|
|
|
|
const { as: Tag = 'td', class: className, ...props } = Astro.props;
|
|
---
|
|
|
|
<Tag class={twMerge('px-6 py-3 text-base', className)} {...props}>
|
|
<slot />
|
|
</Tag>
|