mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
26 lines
516 B
Plaintext
26 lines
516 B
Plaintext
---
|
|
import type { HTMLTag, Polymorphic } from 'astro/types';
|
|
import { clsx } from 'clsx';
|
|
import { twMerge } from '@/utils/twMerge';
|
|
|
|
import { shared } from './styles';
|
|
|
|
type Props<Tag extends HTMLTag = 'ul'> = Polymorphic<{ as: Tag }> & {
|
|
maxWidth?: boolean;
|
|
class?: string;
|
|
};
|
|
|
|
const { as: Tag = 'ul', maxWidth = true, class: className, ...props } = Astro.props;
|
|
---
|
|
|
|
<Tag
|
|
class={twMerge(
|
|
shared.ul,
|
|
clsx("mb-4", maxWidth && "mx-auto max-w-3xl"),
|
|
className,
|
|
)}
|
|
{...props}
|
|
>
|
|
<slot />
|
|
</Tag>
|