Update user conversation bubble links
This commit is contained in:
@@ -5,6 +5,7 @@ import Stack from "@moduletrace/twui/layout/Stack";
|
|||||||
import linkComputerRefs from "@/src/utils/link-computer-refs";
|
import linkComputerRefs from "@/src/utils/link-computer-refs";
|
||||||
import { UserMarkdownComponents } from "../(data)/user-markdown-components";
|
import { UserMarkdownComponents } from "../(data)/user-markdown-components";
|
||||||
import { QuotableAttribute } from "../(hooks)/use-message-selection";
|
import { QuotableAttribute } from "../(hooks)/use-message-selection";
|
||||||
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Kept module-level: a new array on every render makes `react-markdown`
|
* Kept module-level: a new array on every render makes `react-markdown`
|
||||||
@@ -22,9 +23,16 @@ export default function UserBubble({ text }: { text: string }) {
|
|||||||
return (
|
return (
|
||||||
<Stack
|
<Stack
|
||||||
{...{ [QuotableAttribute]: "" }}
|
{...{ [QuotableAttribute]: "" }}
|
||||||
className="max-w-[80%] min-w-0 gap-2.5! items-stretch rounded-default-lg bg-ink text-on-ink px-4 py-3 text-sm leading-5 break-words"
|
className={twMerge(
|
||||||
|
"max-w-[80%] min-w-0 gap-2.5! items-stretch rounded-default-lg",
|
||||||
|
"bg-ink text-on-ink px-4 py-3 text-sm leading-5 break-words",
|
||||||
|
"conversation-user-bubble",
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
<Markdown remarkPlugins={RemarkPlugins} components={UserMarkdownComponents}>
|
<Markdown
|
||||||
|
remarkPlugins={RemarkPlugins}
|
||||||
|
components={UserMarkdownComponents}
|
||||||
|
>
|
||||||
{linkComputerRefs({ text })}
|
{linkComputerRefs({ text })}
|
||||||
</Markdown>
|
</Markdown>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
@@ -362,3 +362,7 @@ footer .twui-anchor.active {
|
|||||||
#admin-main h6 {
|
#admin-main h6 {
|
||||||
@apply text-xs!;
|
@apply text-xs!;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.conversation-user-bubble a {
|
||||||
|
@apply text-blue-400 dark:text-blue-600;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user