web: added the base for the web project

This commit is contained in:
Carl-Gerhard Lindesvärd
2023-10-26 20:53:11 +02:00
parent 15e29edaa7
commit 8a87fff689
107 changed files with 3607 additions and 512 deletions

View File

@@ -0,0 +1,50 @@
import { cn } from "@/utils/cn";
type ContentHeaderProps = {
title: string;
text: string;
children?: React.ReactNode;
};
export function ContentHeader({ title, text, children }: ContentHeaderProps) {
return (
<div className="flex items-center justify-between py-6 first:pt-0">
<div>
<h2 className="h2">{title}</h2>
<p className="text-sm text-muted-foreground">{text}</p>
</div>
<div>{children}</div>
</div>
);
}
type ContentSectionProps = {
title: string;
text: string;
children: React.ReactNode;
asCol?: boolean;
};
export function ContentSection({
title,
text,
children,
asCol,
}: ContentSectionProps) {
return (
<div
className={cn(
"first:pt-0] flex py-6",
asCol ? "col flex" : "justify-between",
)}
>
{title && (
<div className="max-w-[50%]">
<h4 className="h4">{title}</h4>
<p className="text-sm text-muted-foreground">{text}</p>
</div>
)}
<div>{children}</div>
</div>
);
}