feat: ability to remove spacing

This commit is contained in:
2025-05-25 17:51:19 +02:00
parent 8e22a3ac05
commit 0166e62e98

View File

@ -3,16 +3,29 @@ import type { FC, ReactNode } from "react";
interface ComponentProps {
children: ReactNode;
className?: string;
spacing?: boolean;
}
export const Card: FC<ComponentProps> = ({ children, className }) => {
return (
<div className={`bg-white sm:rounded-lg shadow-md ${className || ""}`}>
<div
className={`bg-white sm:rounded-lg overflow-hidden shadow-md ${
className || ""
}`}
>
{children}
</div>
);
};
export function CardContent({ children, className }: ComponentProps) {
return <div className={`p-4 ${className || ""}`}>{children}</div>;
export function CardContent({
children,
className,
spacing = true,
}: ComponentProps) {
return (
<div className={`${spacing ? "p-4 " : ""}${className || ""}`}>
{children}
</div>
);
}