Use new UI (#8983)

* fixup build

* swap frontends
This commit is contained in:
Blake Blackshear
2023-12-16 16:20:59 +00:00
parent a2c6f45454
commit bdebb99b5a
286 changed files with 20010 additions and 20007 deletions

View File

@@ -0,0 +1,73 @@
import { cn } from "@/lib/utils";
type HeadingElements = "h1" | "h2" | "h3" | "h4";
const Heading = ({
children,
as,
className,
}: {
children: React.ReactNode;
as: HeadingElements;
className?: string;
}) => {
switch (as) {
case "h1":
return (
<h1
className={cn(
"scroll-m-20 text-3xl font-extrabold tracking-tight",
className
)}
>
{children}
</h1>
);
case "h2":
return (
<h2
className={cn(
"scroll-m-20 text-3xl font-semibold tracking-tight transition-colors first:mt-0 mb-3",
className
)}
>
{children}
</h2>
);
case "h3":
return (
<h3
className={cn(
"scroll-m-20 text-2xl font-semibold tracking-tight mb-3",
className
)}
>
{children}
</h3>
);
case "h4":
return (
<h4
className={cn(
"scroll-m-20 text-xl font-semibold tracking-tight",
className
)}
>
{children}
</h4>
);
default:
return (
<h1
className={cn(
"scroll-m-20 text-3xl font-extrabold tracking-tight",
className
)}
>
{children}
</h1>
);
}
};
export default Heading;