Skip to content

Commit 1b558a8

Browse files
committed
fix icon sytle
1 parent af630f5 commit 1b558a8

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/message.tsx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ export default function Message(props: Props) {
1515
const [showCopiedHint, setShowCopiedHint] = useState(false);
1616
const DeleteIcon = () => (
1717
<button
18-
className={`absolute bottom-0 left-${
19-
chat.content.length < 4 ? "0" : "2"
20-
}`}
2118
onClick={() => {
2219
chatStore.history[messageIndex].hide =
2320
!chatStore.history[messageIndex].hide;
@@ -50,9 +47,6 @@ export default function Message(props: Props) {
5047
return (
5148
<>
5249
<button
53-
className={`absolute bottom-0 right-${
54-
chat.content.length < 4 ? "0" : "2"
55-
}`}
5650
onClick={() => {
5751
navigator.clipboard.writeText(chat.content);
5852
setShowCopiedHint(true);
@@ -86,19 +80,21 @@ export default function Message(props: Props) {
8680
>
8781
<div>
8882
<div
89-
className={`relative w-fit p-2 rounded my-2 ${
83+
className={`w-fit p-2 rounded my-2 ${
9084
chat.role === "assistant"
9185
? "bg-white dark:bg-gray-700 dark:text-white"
9286
: "bg-green-400"
9387
} ${chat.hide ? "opacity-50" : ""}`}
9488
>
95-
<p className="message-content mb-3">
89+
<p className="message-content">
9690
{chat.hide
9791
? chat.content.split("\n")[0].slice(0, 16) + "... (deleted)"
9892
: chat.content}
9993
</p>
100-
<DeleteIcon />
101-
<CopyIcon />
94+
<div className="w-full flex justify-between">
95+
<DeleteIcon />
96+
<CopyIcon />
97+
</div>
10298
</div>
10399
{showCopiedHint && <CopiedHint />}
104100
{chatStore.develop_mode && (

0 commit comments

Comments
 (0)