Files
NwaifuMiniApp/src/components/Block.tsx

21 lines
561 B
TypeScript

import { cn } from "@/utils/cn";
import { PropsWithChildren } from "react";
type BlockProps = PropsWithChildren<{ name?: string; className?: string }>;
const Block: React.FC<BlockProps> = ({ children, name = "", className = "" }) => {
return (
<div
className={cn(
"flex h-fit w-full flex-col items-center gap-2.5 rounded-lg bg-[var(--tg-theme-section-bg-color)] py-2.5 shadow-md",
className
)}
>
{name && <span className="text-semibold text-lg">{name}</span>}
{children}
</div>
);
};
export { Block };