feat: ability to remove spacing
This commit is contained in:
@ -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>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user