Skip to content

Commit 30138bb

Browse files
committed
added spaces between texts
1 parent 019bd55 commit 30138bb

1 file changed

Lines changed: 15 additions & 9 deletions

File tree

client/src/components/TextChat.jsx

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,39 +142,45 @@ function MessageComp({ attribute, showNickname, showTitle }) {
142142
<p className="text-sm">{msg.text}</p>
143143
</div>
144144
<button
145-
className="absolute -bottom-6 right-0 text-lg hover:bg-gray-200 rounded-full px-2 py-1 transition"
145+
className="absolute -bottom-8 right-0 text-lg hover:bg-gray-200 rounded-full px-2 py-1 transition"
146146
title="React"
147147
onClick={() => { }}
148148
>
149149
😐
150150
</button>
151151
</div>
152-
<div class="spacer"></div>
152+
<div className="h-4" />
153153
</div>
154154
);
155155
}
156156

157157
return (
158158
<div className="flex justify-start my-2">
159159
<div className="relative flex flex-col items-start max-w-[50%]">
160-
<span className="absolute -top-5 left-0 text-xs font-bold text-gray-700">
161-
{showNickname && msg.sender.name}
162-
</span>
163-
<span className="absolute -top-5 right-0 text-xs text-gray-400">
164-
{ts && relTime(ts)}
160+
<span className="absolute -top-5 left-0 flex items-center gap-1 text-xs">
161+
{showNickname && (
162+
<span className="font-bold text-gray-700">
163+
{msg.sender.name}
164+
</span>
165+
)}
166+
{ts && (
167+
<span className="text-gray-400 font-normal">
168+
{relTime(ts)}
169+
</span>
170+
)}
165171
</span>
166172
<div className="bg-gray-100 text-black-900 px-4 py-2 rounded-xl rounded-tl-none shadow group" style={{ wordWrap: 'break-word', overflowWrap: 'break-word' }}>
167173
<p className="text-sm">{msg.text}</p>
168174
</div>
169175
<button
170-
className="absolute -bottom-6 right-0 text-lg hover:bg-gray-200 rounded-full px-2 py-1 transition"
176+
className="absolute -bottom-8 right-0 text-lg hover:bg-gray-200 rounded-full px-2 py-1 transition"
171177
title="React"
172178
onClick={() => { }}
173179
>
174180
😐
175181
</button>
176182
</div>
177-
<div class="spacer"></div>
183+
<div className="h-4" />
178184
</div>
179185
);
180186
}

0 commit comments

Comments
 (0)