This commit is contained in:
2026-03-04 17:35:14 +01:00
parent f73b56cdc4
commit db26e26495
113 changed files with 12433 additions and 169 deletions
+19 -2
View File
@@ -6,12 +6,29 @@ import { twMerge } from "tailwind-merge";
* @className twui-span
*/
export default function Span({
size,
variant,
truncate,
...props
}: DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>) {
}: DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement> & {
size?: "normal" | "small" | "smaller" | "large" | "larger";
variant?: "normal" | "faded";
truncate?: { lines?: number; width?: number };
}) {
return (
<span
{...props}
className={twMerge("text-base", "twui-span", props.className)}
className={twMerge(
"",
size == "small" && "text-sm",
size == "smaller" && "text-xs",
size == "large" && "text-lg",
size == "larger" && "text-xl",
variant == "faded" && "opacity-50",
truncate ? `` : ``,
"twui-span",
props.className,
)}
>
{props.children}
</span>