Skip to content

Commit

Permalink
Add className prop to CardGroup (#86)
Browse files Browse the repository at this point in the history
feat: adds className prop to CardGroup
  • Loading branch information
ghoshnirmalya authored May 22, 2023
1 parent e35312c commit 37e23af
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/CardGroup.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
import clsx from 'clsx';
import React, { ReactNode } from 'react';

export function CardGroup({ children, cols = 2 }: { children: ReactNode; cols?: 1 | 2 | 3 | 4 }) {
return <div className={`not-prose grid sm:grid-cols-${cols} gap-x-4`}>{children}</div>;
export function CardGroup({
children,
cols = 2,
className,
}: {
children: ReactNode;
cols?: 1 | 2 | 3 | 4;
className?: string;
}) {
return (
<div className={clsx(`not-prose grid sm:grid-cols-${cols} gap-x-4`, className)}>{children}</div>
);
}

0 comments on commit 37e23af

Please sign in to comment.