fix: update ShortcutComponent styles for improved layout and cursor behavior

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei
2025-10-21 19:32:12 +08:00
parent ae89af5608
commit 3406aecec6
2 changed files with 8 additions and 4 deletions
@@ -98,7 +98,11 @@ export class ShortcutNode extends DecoratorNode<React.JSX.Element> {
return (
<React.Suspense fallback={null}>
<ShortcutComponent shortcutData={this.__shortcutData} key={`${this.__key}-${dataKey}`} />
<ShortcutComponent
className="cursor-default"
shortcutData={this.__shortcutData}
key={`${this.__key}-${dataKey}`}
/>
</React.Suspense>
)
}
@@ -32,7 +32,7 @@ export const ShortcutComponent: React.FC<ShortcutComponentProps> = ({
<MentionLikePill
className={className}
icon={
<span className="inline-flex size-4 items-center justify-center rounded-full bg-blue/10 text-[11px] font-semibold leading-none text-blue">
<span className="bg-blue/10 text-blue inline-flex size-4 items-center justify-center rounded-full text-[11px] font-semibold leading-none">
#
</span>
}
@@ -45,10 +45,10 @@ export const ShortcutComponent: React.FC<ShortcutComponentProps> = ({
<TooltipPortal>
<TooltipContent side="top" className="max-w-[320px]">
<div className="flex flex-col gap-1 p-1">
<span className="text-sm font-medium text-text">{shortcutData.name}</span>
<span className="text-text text-sm font-medium">{shortcutData.name}</span>
{shortcutData.prompt ? (
<span className="line-clamp-3 text-xs leading-snug text-text-tertiary">
<span className="text-text-secondary text-xs leading-snug">
{shortcutData.prompt}
</span>
) : null}