diff --git a/packages/ui/src/components/Card/Card.tsx b/packages/ui/src/components/Card/Card.tsx index fa220a0156..eac63ee8b3 100644 --- a/packages/ui/src/components/Card/Card.tsx +++ b/packages/ui/src/components/Card/Card.tsx @@ -6,36 +6,46 @@ import { Heading, Text } from 'ui' import { cardHeader, cardRoot } from './Card.css' type RootStyleProps = RecipeVariants -type RootProps = ComponentProps<'div'> & RootStyleProps +type RootProps = ComponentProps<'article'> & RootStyleProps -function CardRoot({ variant, size, className, children }: PropsWithChildren) { - return
{children}
+function CardRoot({ variant, size, className, children, ...props }: RootProps) { + return ( +
+ {children} +
+ ) } type HeaderProps = ComponentProps<'header'> -function CardHeader({ className, children }: PropsWithChildren) { - return
{children}
+function CardHeader({ className, children, ...props }: HeaderProps) { + return ( +
+ {children} +
+ ) } -type MediaProps = PropsWithChildren> - -function CardMedia({ children }: MediaProps) { +function CardMedia({ children }: PropsWithChildren) { // Slot ensures only one element is passed as children return {children} } type HeadingProps = ComponentProps<'div'> -function CardHeading({ className, children }: PropsWithChildren) { - return
{children}
+function CardHeading({ className, children, ...props }: HeadingProps) { + return ( +
+ {children} +
+ ) } type TitleProps = ComponentProps -function CardTitle({ className, children }: PropsWithChildren) { +function CardTitle({ className, children, ...props }: TitleProps) { return ( - + {children} ) @@ -43,9 +53,9 @@ function CardTitle({ className, children }: PropsWithChildren) { type SubtitleProps = ComponentProps -function CardSubtitle({ className, children }: PropsWithChildren) { +function CardSubtitle({ className, children, ...props }: SubtitleProps) { return ( - + {children} )