11import React , { ReactNode } from "react" ;
22import Heading from "@theme/Heading" ;
3- import Button from "@site/src/components/Common/Button" ;
3+ import Button , { type ButtonVariant } from "@site/src/components/Common/Button" ;
44import { IconName } from "@site/src/typescript/iconName" ;
55import Badge from "@site/src/components/Common/Badge" ;
66import isInternalUrl from "@docusaurus/isInternalUrl" ;
@@ -11,7 +11,7 @@ export interface CardWithImageHorizontalProps {
1111 imgSrc : string ;
1212 imgAlt ?: string ;
1313 url ?: string ;
14- buttonVariant ?: "default" | "outline" | "ghost" | "destructive" | "secondary" ;
14+ buttonVariant ?: ButtonVariant ;
1515 ctaLabel ?: string ;
1616 iconName ?: IconName ;
1717}
@@ -27,8 +27,8 @@ export default function CardWithImageHorizontal({
2727 iconName,
2828} : CardWithImageHorizontalProps ) {
2929 return (
30- < div className = "card group flex !flex-row items-center gap-4 overflow-hidden rounded-2xl border border-black/10 dark:border-white/10 bg-muted/40 p-4 transition-colors" >
31- < div className = "basis-1/3 flex-shrink-0 overflow-hidden rounded-xl relative flex items-center" >
30+ < div className = "card group !grid [grid-template-columns:repeat(auto-fit,minmax(15rem,1fr))] items-center gap-4 overflow-hidden rounded-2xl border border-black/10 dark:border-white/10 bg-muted/40 p-4 transition-colors" >
31+ < div className = "aspect-[400/209] overflow-hidden rounded-xl relative flex items-center" >
3232 < img
3333 src = { imgSrc }
3434 alt = { imgAlt }
@@ -40,17 +40,17 @@ export default function CardWithImageHorizontal({
4040 </ Badge >
4141 ) }
4242 </ div >
43- < div className = "flex flex-col flex-1 min-w-0 justify-center items-start gap-1" >
43+ < div className = "flex flex-col min-w-0 justify-center gap-1" >
4444 < Heading as = "h4" className = "!mb-1" >
4545 { title }
4646 </ Heading >
4747 < p className = "!mb-3 text-sm" > { description } </ p >
4848 { url && (
49- < Button variant = { buttonVariant } size = "sm" url = { url } className = "self-start" >
49+ < Button variant = { buttonVariant } url = { url } >
5050 { ctaLabel }
5151 </ Button >
5252 ) }
5353 </ div >
5454 </ div >
5555 ) ;
56- }
56+ }
0 commit comments