diff --git a/src/components/cards/index.tsx b/src/components/cards/index.tsx new file mode 100644 index 00000000..abded2d9 --- /dev/null +++ b/src/components/cards/index.tsx @@ -0,0 +1,38 @@ +import * as React from 'react' +import { cva, type VariantProps } from 'class-variance-authority' +import { Card as BaseCard, CardTitle as BaseCardTitle, CardContent as BaseCardContent } from '../ui/card' +import { cn } from '../../lib/utils' +export { CardFooter, CardHeader, CardAction, CardDescription } from '../ui/card' + +const cardVariants = cva('rounded-sm', { + variants: { + variant: { + default: '', + layout: 'flex-1 gap-2 bg-background mb-4 md:mb-6', + }, + }, + defaultVariants: { + variant: 'default', + }, +}) + +type CardProps = React.ComponentProps & VariantProps + +export const Card = ({ className, variant, ...props }: CardProps) => ( + +) + +type CardTitleProps = React.ComponentProps + +export const CardTitle = ({ className, ...props }: CardTitleProps) => ( + a]:font-medium [&>a]:text-sm', className)} + {...props} + /> +) + +type CardContentProps = React.ComponentProps + +export const CardContent = ({ className, ...props }: CardContentProps) => ( + +) diff --git a/src/stories/Card/Card.stories.tsx b/src/stories/Card/Card.stories.tsx index 68994022..bd1c98fd 100644 --- a/src/stories/Card/Card.stories.tsx +++ b/src/stories/Card/Card.stories.tsx @@ -7,7 +7,7 @@ import { CardFooter, CardHeader, CardTitle, -} from '../../components/ui/card.tsx' +} from '../../components/cards' import { Button } from '../../components/ui/button.tsx' import { expect, within } from 'storybook/test' @@ -65,7 +65,7 @@ export const WithAction: Story = { - View your notifications here. + View and interact with your notifications here.