Skip to content

Commit

Permalink
add new feature card
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwaits committed Nov 13, 2024
1 parent 2d1e203 commit 5b240d2
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions components/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,35 @@ export function Card({
);
}

export type FeatureCardProps = {
title: string;
description: string;
image?: string;
} & Omit<LinkProps, "title">;

export function FeatureCard({
title,
description,
image,
...props
}: FeatureCardProps): React.ReactElement {
return (
<Link
{...props}
className={cn(
"not-prose flex flex-col justify-center rounded-lg border bg-background text-md transition-colors hover:bg-accent/80 pr-0 pl-12 py-0",
props.className
)}
>
<div className="flex justify-between">
<img src={image} alt="arrow-right" />
</div>
<h3 className="mb-1 font-medium">{title}</h3>
<p className="text-muted-foreground">{description}</p>
</Link>
);
}

export type SecondaryCardProps = {
icon?: ReactNode;
title: string;
Expand Down

0 comments on commit 5b240d2

Please sign in to comment.