Skip to content

Commit

Permalink
update highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
shahednasser committed Oct 16, 2024
1 parent 2486a54 commit 0d5faf9
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions www/packages/docs-ui/src/components/CodeBlock/Line/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,21 +205,17 @@ export const CodeBlockLine = ({
isTokenHighlighted: boolean
offset: number
}) => (
<span
className={clsx(
isTokenHighlighted && "cursor-default",
isTokenHighlighted &&
!animateTokenHighlights &&
"lg:bg-medusa-alpha-white-alpha-6 lg:border lg:border-medusa-alpha-white-alpha-12 lg:rounded-docs_xs",
animateTokenHighlights && isTokenHighlighted && "relative"
)}
>
{animateTokenHighlights && isTokenHighlighted && (
<span className={clsx(isTokenHighlighted && "relative")}>
{isTokenHighlighted && (
<span
className={clsx(
"animate-fast animate-growWidth animation-fill-forwards",
animateTokenHighlights && [
"animate-fast animate-growWidth animation-fill-forwards",
],
!animateTokenHighlights && "w-full",
"absolute left-0 top-0 h-full z-0",
"lg:bg-medusa-alpha-white-alpha-6 lg:border lg:border-medusa-alpha-white-alpha-12 lg:rounded-docs_xs"
"lg:bg-medusa-alpha-white-alpha-6 lg:border lg:border-medusa-alpha-white-alpha-12",
"lg:rounded-docs_xs scale-x-[1.05]"
)}
/>
)}
Expand All @@ -234,7 +230,7 @@ export const CodeBlockLine = ({
key={tokenKey}
className={clsx(
tokenClassName,
isTokenHighlighted && animateTokenHighlights && "relative z-[1]"
isTokenHighlighted && "relative z-[1]"
)}
{...rest}
/>
Expand Down

0 comments on commit 0d5faf9

Please sign in to comment.