File size: 808 Bytes
41a71fd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
import { ReactNode } from 'react';
import { classNames } from '@/shared/lib/classNames/classNames';
import { PostType } from '../../model/types/post';
import cls from './PostCard.module.scss';
interface PostCardProps {
className?: string;
post: PostType;
editButton?: ReactNode;
deleteButton?: ReactNode;
}
export const PostCard = (props: PostCardProps) => {
const { className, post, editButton, deleteButton } = props;
return (
<div className={classNames(cls.PostCard, {}, [className])}>
<div className={cls.content}>
<div className={cls.name}>{post.title}</div>
<div className={cls.buttons}>
{editButton}
{deleteButton}
</div>
</div>
</div>
);
};
|