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

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>