/
githubmirror
/
trpc
Обзор
Документация
Войти
/
githubmirror
/
trpc
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
www/src/components/ArticleCard.tsx
41 строка
1011 B
Christopher Ehrlich
docs: reorganize and write introductory articles (#4128)
01 май 2023, 23:17
Не верифицирован
01 май 2023, 23:17
061c49f
Код
Авторство
О чём код?
import React from 'react'; type Props = { title: string; link: string; date: Date; author: { name: string; description: string; avatar: string; link: string; }; }; export const ArticleCard = ({ title, link, date, author }: Props) => { return ( <div className="flex w-full max-w-2xl flex-col gap-6 rounded-xl border p-8 shadow-xl"> <h2> <a href={link} target="_blank" rel="noopener noreferrer"> {title}{' '} </a> </h2> <div className="flex w-full justify-between"> <div className="flex justify-between gap-4"> <img src={author.avatar} alt={author.name} className="mt-1 h-10 w-10 rounded-full" /> <div className="flex flex-col"> <div> <a href={author.link}>{author.name}</a> </div> <p>{author.description}</p> </div> </div> <p>{date.toDateString()}</p> </div> </div> ); };