Skip to content

Commit

Permalink
Fix warning for card component
Browse files Browse the repository at this point in the history
  • Loading branch information
instantfred committed Jul 21, 2024
1 parent cba2376 commit 8d37c5d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/@/components/ui/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,19 @@ const CardHeader = React.forwardRef<
CardHeader.displayName = "CardHeader"

const CardTitle = React.forwardRef<
HTMLParagraphElement,
HTMLHeadingElement,
React.HTMLAttributes<HTMLHeadingElement>
>(({ className, ...props }, ref) => (
>(({ className, children, ...props }, ref) => (
<h3
ref={ref}
className={cn(
"text-2xl font-semibold leading-none tracking-tight",
className
)}
{...props}
/>
>
{children || <span className="sr-only">Card Title</span>}
</h3>
))
CardTitle.displayName = "CardTitle"

Expand Down

0 comments on commit 8d37c5d

Please sign in to comment.