|
|
|
@ -7,7 +7,7 @@ const TimeLineItem = ({ data }) => ( |
|
|
|
|
> |
|
|
|
|
<div |
|
|
|
|
className="timeline-item-content relative bg-white rounded-md shadow-sm flex flex-col items-end border border-[#D6D6D6] " |
|
|
|
|
style={{ maxWidth: "70%", width: "400px" }} |
|
|
|
|
style={{ maxWidth: "100%", width: "400px" }} |
|
|
|
|
> |
|
|
|
|
{/* top --> time & date */} |
|
|
|
|
<div className="flex flex-row-reverse p-3 self-end"> |
|
|
|
@ -28,15 +28,37 @@ const TimeLineItem = ({ data }) => ( |
|
|
|
|
{/* divider */} |
|
|
|
|
<div className="border border-[#F3F3F3] w-11/12 mt-4 mx-auto"></div> |
|
|
|
|
{/* bottom --> users */} |
|
|
|
|
<div className="flex flex-row items-center self-start px-4 py-2"> |
|
|
|
|
{data.users.map((user, index) => ( |
|
|
|
|
<div key={index} className="flex flex-row items-center"> |
|
|
|
|
<p className="mr-1 text-sm text-[#00253A]"> |
|
|
|
|
{user.name + " " + user.lname} |
|
|
|
|
</p> |
|
|
|
|
{"،"} |
|
|
|
|
</div> |
|
|
|
|
))} |
|
|
|
|
<div className="flex flex-row justify-between px-4 py-2 w-full"> |
|
|
|
|
<div className="flex flex-row items-center"> |
|
|
|
|
{data.users.slice(0, 3).map((user, index) => ( |
|
|
|
|
<div key={index} className="flex flex-row items-center"> |
|
|
|
|
<p className="mr-1 text-xs text-[#00253A]"> |
|
|
|
|
{user.name + " " + user.lname} |
|
|
|
|
</p> |
|
|
|
|
{Number(index) >= 2 ? ( |
|
|
|
|
<p className=" text-xs mx-1 text-[#00253A]">و</p> |
|
|
|
|
) : ( |
|
|
|
|
<p className=" text-xs text-[#00253A]">،</p> |
|
|
|
|
)} |
|
|
|
|
{Number(index) === 2 && ( |
|
|
|
|
<p className=" text-xs text-[#00253A]"> |
|
|
|
|
{data.users.length - 2}+ نفر دیگه |
|
|
|
|
</p> |
|
|
|
|
)} |
|
|
|
|
</div> |
|
|
|
|
))} |
|
|
|
|
</div> |
|
|
|
|
{/* profilePic */} |
|
|
|
|
<div className="flex flex-row items-center"> |
|
|
|
|
{data.users.slice(0, 3).map((user, i) => ( |
|
|
|
|
<img |
|
|
|
|
key={i} |
|
|
|
|
src={user.profilePic} |
|
|
|
|
className="w-10" |
|
|
|
|
style={{ marginLeft: "-10px" }} |
|
|
|
|
/> |
|
|
|
|
))} |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<span className="circle"></span> |
|
|
|
|
</div> |
|
|
|
|