/
redly
/
reactposts
Обзор
Документация
Войти
/
redly
/
reactposts
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/components/Post.tsx
29 строк
448 B
Redlyweb
feat: add search, pagination, sort, auth with useContext
26 июн 2024, 11:45
26 июн 2024, 11:45
840acc1
Код
Авторство
О чём код?
import styled from 'styled-components' const StyledPost = styled.article` margin-top: 10px; box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); padding: 15px 20px; p { margin-top: 15px; } ` export interface Post { title: string; body: string; id: number; } export default function Post({post}: {post: Post}) { return ( <StyledPost> <h1>{post.id}. {post.title}</h1> <p>{post.body}</p> </StyledPost> ) }