@@ -2,7 +2,7 @@ import classNames from 'classnames';
22import React from 'react' ;
33
44import type { BoxProps , PictureProps } from '@/components' ;
5- import { Box , Flex , Heading , Picture , Skeleton , Text } from '@/components' ;
5+ import { Box , Heading , Picture , Skeleton , Text } from '@/components' ;
66import { PostMetadata } from '@/components' ;
77import type { ComponentPropsWithoutRef } from '@/types' ;
88
@@ -49,18 +49,16 @@ export const PostCard: React.FC<PostCardProps> = ({
4949 } ) }
5050 >
5151 < Skeleton isLoading = { isLoading } >
52- < Picture { ...cover } img = { { className : 'post-card__cover' , ... cover ?. img } } />
52+ < Picture { ...cover } img = { { ... cover ?. img , className : 'post-card__cover' } } />
5353 </ Skeleton >
54- < Flex
55- flexDirection = "column"
56- justifyContent = "between"
57- my = { { xs : 's' , md : 'm' } }
58- pl = { { xs : 's' , md : 'm' } }
59- pr = { { xs : 'xs' , md : 'm' } }
60- flex = "1"
61- >
54+ < Box my = { { xs : 's' , md : 'm' } } pl = { { xs : 's' , md : 'm' } } pr = { { xs : 'xs' , md : 'm' } } flex = "1" >
6255 < Skeleton isLoading = { isLoading } >
63- < Heading as = "h2" size = "xs" lineClamp = { 2 } className = "post-card__heading" >
56+ < Heading
57+ as = "h2"
58+ size = "xs"
59+ lineClamp = { { xs : variant === 'highlight-dark' ? 2 : 4 , md : variant === 'highlight-light' ? 3 : 2 } }
60+ className = "post-card__heading"
61+ >
6462 < Text as = "a" { ...link } size = "m" data-internal-link = "post" className = "post-card__link" >
6563 { title }
6664 </ Text >
@@ -89,11 +87,11 @@ export const PostCard: React.FC<PostCardProps> = ({
8987 />
9088 { variant !== 'highlight-dark' && (
9189 < Skeleton isLoading = { isLoading } >
92- < Text mt = "xs" size = "s" hiddenBelow = "md" lineClamp = { 2 } className = "post-card__excerpt" >
90+ < Text mt = "xs" size = "s" hiddenBelow = "md" lineClamp = { { xs : 4 , md : 2 } } className = "post-card__excerpt" >
9391 { excerpt }
9492 </ Text >
9593 </ Skeleton >
9694 ) }
97- </ Flex >
95+ </ Box >
9896 </ Box >
9997) ;
0 commit comments