-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPost.js
35 lines (31 loc) · 1.35 KB
/
Post.js
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
29
30
31
32
33
34
35
import { Avatar } from "@material-ui/core";
import React, { forwardRef } from 'react';
import InputOption from "./InputOption";
import './Post.css';
import ThumbUpAltOutlinedIcon from "@material-ui/icons/ThumbUpAltOutlined";
import ChatOutlinedIcon from "@material-ui/icons/ChatOutlined";
import ShareOutlinedIcon from "@material-ui/icons/ShareOutlined";
import SendOutlinedIcon from "@material-ui/icons/SendOutlined";
const Post = forwardRef(({ name, description, message, photoUrl }, ref) => {
return (
<div ref={ref} className="post">
<div className="post__header">
<Avatar src={photoUrl}></Avatar>
<div className="post__info">
<h2>{name}</h2>
<p>{description}</p>
</div>
</div>
<div className="post__body">
<p>{message}</p>
</div>
<div className="post__buttons">
<InputOption Icon={ThumbUpAltOutlinedIcon} title="Like" color="gray" />
<InputOption Icon={ChatOutlinedIcon} title="Comment" color="gray" />
<InputOption Icon={ShareOutlinedIcon} title="Share" color="gray" />
<InputOption Icon={SendOutlinedIcon} title="Send" color="gray" />
</div>
</div>
);
});
export default Post;