fix: resolve TypeScript errors in migrated components
This commit is contained in:
22
apps/web/src/components/ui/card.tsx
Normal file
22
apps/web/src/components/ui/card.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
export { Card, CardHeader, CardContent, CardFooter } from "@mosaic/ui";
|
||||
export type { CardProps, CardHeaderProps, CardContentProps, CardFooterProps } from "@mosaic/ui";
|
||||
|
||||
// Additional Card sub-components for shadcn/ui compatibility
|
||||
import * as React from "react";
|
||||
|
||||
export interface CardTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {}
|
||||
export interface CardDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {}
|
||||
|
||||
export const CardTitle = React.forwardRef<HTMLHeadingElement, CardTitleProps>(
|
||||
({ className = "", ...props }, ref) => (
|
||||
<h3 ref={ref} className={`text-2xl font-semibold leading-none tracking-tight ${className}`} {...props} />
|
||||
)
|
||||
);
|
||||
CardTitle.displayName = "CardTitle";
|
||||
|
||||
export const CardDescription = React.forwardRef<HTMLParagraphElement, CardDescriptionProps>(
|
||||
({ className = "", ...props }, ref) => (
|
||||
<p ref={ref} className={`text-sm text-gray-600 ${className}`} {...props} />
|
||||
)
|
||||
);
|
||||
CardDescription.displayName = "CardDescription";
|
||||
Reference in New Issue
Block a user