Skip to content

Commit

Permalink
fix(ui): fix the style of inline code in Answer Engine (#3535)
Browse files Browse the repository at this point in the history
* fix(ui): fix the style of inline code in Answer Engine

* update

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
liangfung and autofix-ci[bot] authored Dec 9, 2024
1 parent 301c857 commit 0115871
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions ee/tabby-ui/components/message-markdown/code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,17 @@ export function CodeElement({

return (
<code
className={cn(
'group/symbol inline-flex flex-nowrap items-center gap-1',
className,
{
symbol: !!lookupSymbol,
'bg-muted leading-5': !isSymbolNavigable,
'cursor-pointer hover:bg-muted/50 border': isSymbolNavigable
}
)}
className={cn('group/symbol', className, {
symbol: !!lookupSymbol,
'bg-muted leading-5 py-0.5': !!lookupSymbol && !isSymbolNavigable,
'inline-flex items-center gap-1 cursor-pointer hover:bg-muted/50 border':
isSymbolNavigable
})}
onClick={handleClick}
{...props}
>
{isSymbolNavigable && (
<IconSquareChevronRight className="h-3.5 w-3.5 text-primary" />
<IconSquareChevronRight className="h-3.5 w-3.5 shrink-0 text-primary" />
)}
<span
className={cn('self-baseline', {
Expand Down

0 comments on commit 0115871

Please sign in to comment.