web: added the base for the web project
This commit is contained in:
50
apps/web/src/components/Content.tsx
Normal file
50
apps/web/src/components/Content.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user