@@ -20,19 +20,20 @@ type Props = {
20
20
highlighted : HighlightedCode
21
21
showPanel ?: boolean
22
22
className ?: string
23
- copyButtonClassName ?: string
24
23
} & HandlerProps
25
24
26
25
const Pre : React . FC < Props > = ( {
27
26
highlighted,
28
27
showPanel,
29
28
enableTransitions,
30
29
className,
31
- copyButtonClassName,
32
30
} ) => {
33
31
const { title } = meta ( highlighted )
34
32
35
33
let handlers = [ callout , fold , collapse , collapseTrigger , collapseContent ]
34
+
35
+ // Getting an issue with color transitions on the -code-text token
36
+ // Note: this also won't work with the Tabs component, only the CodeSwitcherSelect
36
37
if ( enableTransitions ) {
37
38
handlers = [ ...handlers , tokenTransitions ]
38
39
}
@@ -47,23 +48,23 @@ const Pre: React.FC<Props> = ({
47
48
< div className = "relative flex h-9 items-center justify-start pr-12 font-display text-2xs text-zinc-300 sm:text-xs" >
48
49
{ /* one-off breakpoint to hide the filename on extremely narrow screens - to avoid interfering with the lang select */ }
49
50
< div className = "relative flex h-full items-center justify-center gap-x-1 px-4" >
50
- < div className = "size-[6px] rounded-full bg-zinc-300/10" />
51
- < div className = "size-[6px] rounded-full bg-zinc-300/10" />
52
- < div className = "size-[6px] rounded-full bg-zinc-300/10" />
51
+ < div className = "size-[6px] rounded-full bg-zinc-300 dark:bg-zinc-300 /10" />
52
+ < div className = "size-[6px] rounded-full bg-zinc-300 dark:bg-zinc-300 /10" />
53
+ < div className = "size-[6px] rounded-full bg-zinc-300 dark:bg-zinc-300 /10" />
53
54
</ div >
54
- < div className = "absolute bottom-0 h-[1px] w-full bg-zinc-300/5" />
55
+ < div className = "absolute bottom-0 h-px w-full bg-zinc-200 dark: bg-zinc-300/5" />
55
56
</ div >
56
57
) }
57
58
{ showFileNamePanel && (
58
- < div className = "relative flex h-10 items-center justify-start pr-12 font-display text-2xs text-zinc-300 sm:text-xs" >
59
+ < div className = "relative flex h-10 items-center justify-start pr-12 font-display text-2xs dark: text-zinc-300 sm:text-xs" >
59
60
{ /* one-off breakpoint to hide the filename on extremely narrow screens - to avoid interfering with the lang select */ }
60
- < div className = "relative flex h-full items-center border-r border-zinc-300/5" >
61
+ < div className = "relative flex h-full items-center border-r dark: border-zinc-300/5" >
61
62
< span className = "hidden whitespace-nowrap px-4 py-2 min-[320px]:block" >
62
63
{ title }
63
64
</ span >
64
- < div className = "absolute bottom-0 h-[1px] w-full bg-primary-300" />
65
+ < div className = "absolute bottom-0 z-10 h-px w-full bg-primary-300" />
65
66
</ div >
66
- < div className = "absolute bottom-0 h-[1px] w-full bg-zinc-300/5" />
67
+ < div className = "absolute bottom-0 h-px w-full bg-zinc-200 dark: bg-zinc-300/5" />
67
68
</ div >
68
69
) }
69
70
< CopyButton
0 commit comments