From 5934fc381d94256b559c89b0d997bed603a6495e Mon Sep 17 00:00:00 2001 From: Innei Date: Thu, 4 Jan 2024 21:51:57 +0800 Subject: [PATCH] fix: full movie card Signed-off-by: Innei --- src/components/ui/link-card/LinkCard.tsx | 5 ++++- tailwind.config.ts | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/ui/link-card/LinkCard.tsx b/src/components/ui/link-card/LinkCard.tsx index d9866a72b6..72f56520fc 100644 --- a/src/components/ui/link-card/LinkCard.tsx +++ b/src/components/ui/link-card/LinkCard.tsx @@ -51,6 +51,7 @@ type CardState = { classNames?: Partial<{ image: string + cardRoot: string }> } @@ -128,13 +129,14 @@ const LinkCardImpl: FC = (props) => { href={fullUrl} target={source !== 'self' ? '_blank' : '_self'} ref={ref} - className={clsx( + className={clsxm( styles['card-grid'], (loading || isError) && styles['skeleton'], isError && styles['error'], 'group', className, + classNames.cardRoot, )} style={{ borderColor: cardInfo?.color ? `${cardInfo.color}30` : '', @@ -467,6 +469,7 @@ const fetchTheMovieDBData: FetchObject = { classNames: { image: 'self-start mt-4', + cardRoot: '!w-full', }, }) setFullUrl(json.homepage) diff --git a/tailwind.config.ts b/tailwind.config.ts index f9c787c880..5152b99947 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -189,10 +189,11 @@ const twConfig: Config = { 'group-hover:opacity-100', 'transition-opacity', 'group-hover:animation-blink', + + '!w-full', + 'w-full', ], theme: { - // colors: createVariableColors(twColors), - extend: { fontFamily: { sans: 'var(--font-sans),system-ui,-apple-system,PingFang SC,"Microsoft YaHei",Segoe UI,Roboto,Helvetica,noto sans sc,hiragino sans gb,"sans-serif",Apple Color Emoji,Segoe UI Emoji,Not Color Emoji',