|
|
|
@ -6,15 +6,19 @@ interface NewsCardProps { |
|
|
|
|
date: Date; |
|
|
|
|
author: string; |
|
|
|
|
children: ReactNode; |
|
|
|
|
fit?: boolean; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export const NewsCard: React.FC<NewsCardProps> = ({ |
|
|
|
|
date, |
|
|
|
|
author, |
|
|
|
|
children, |
|
|
|
|
fit = false, |
|
|
|
|
}) => { |
|
|
|
|
const classes = fit ? [styles.card, styles.fit] : [styles.card]; |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<article className={styles.card}> |
|
|
|
|
<article className={classes.join(" ")}> |
|
|
|
|
<h1 className={styles.date}> |
|
|
|
|
<time dateTime={date.toISOString()}> |
|
|
|
|
{date.toLocaleDateString("en-US", { |
|
|
|
|