Skip to content

Commit 00024ac

Browse files
authored
Merge pull request #323 from yz778/layout-shift
fix: layout shift caused by hovering over icons + misc items
2 parents b6814a9 + 509a732 commit 00024ac

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/components/Common/Playground/Message.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const PlaygroundMessage = (props: Props) => {
5353
const { cancel, isSpeaking, speak } = useTTS()
5454
return (
5555
<div className="group w-full text-gray-800 dark:text-gray-100">
56-
<div className="text-base md:max-w-2xl lg:max-w-xl xl:max-w-3xl flex lg:px-0 m-auto w-full">
56+
<div className="text-base md:max-w-2xl lg:max-w-xl xl:max-w-3xl flex lg:px-0 m-auto w-full">
5757
<div className="flex flex-row gap-4 md:gap-6 p-4 md:py-6 lg:px-0 m-auto w-full">
5858
<div className="w-8 flex flex-col relative items-end">
5959
<div className="relative h-7 w-7 p-1 rounded-sm text-white flex items-center justify-center text-opacity-100r">
@@ -132,7 +132,7 @@ export const PlaygroundMessage = (props: Props) => {
132132
</>
133133
) : (
134134
<p
135-
className={`prose dark:prose-invert whitespace-pre-line prose-p:leading-relaxed prose-pre:p-0 dark:prose-dark ${
135+
className={`prose dark:prose-invert whitespace-pre-line prose-p:leading-relaxed prose-pre:p-0 dark:prose-dark ${
136136
props.message_type &&
137137
"italic text-gray-500 dark:text-gray-400 text-sm"
138138
}`}>
@@ -148,7 +148,7 @@ export const PlaygroundMessage = (props: Props) => {
148148
/>
149149
)}
150150
</div>
151-
{/* source if aviable */}
151+
{/* source if available */}
152152
{props.images &&
153153
props.images &&
154154
props.images.filter((img) => img.length > 0).length > 0 && (
@@ -196,10 +196,10 @@ export const PlaygroundMessage = (props: Props) => {
196196
)}
197197
{!props.isProcessing && !editMode && (
198198
<div
199-
className={`space-x-2 gap-2 mt-3 ${
199+
className={`space-x-2 gap-2 mt-3 flex ${
200200
props.currentMessageIndex !== props.totalMessages - 1
201-
? "hidden group-hover:flex"
202-
: "flex"
201+
? "invisible group-hover:visible"
202+
: ""
203203
}`}>
204204
{props.isTTSEnabled && (
205205
<Tooltip title={t("tts")}>

0 commit comments

Comments
 (0)