File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
src/components/index-page/what-is-graphql Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -544,6 +544,7 @@ export function Wires({ className }: { className?: string }) {
544
544
aria-label = { step === 2 ? "Show query again" : "Next step" }
545
545
className = "absolute inset-0 outline-none"
546
546
/>
547
+
547
548
< div
548
549
aria-hidden = { step === 2 }
549
550
className = { clsx (
@@ -565,6 +566,7 @@ export function Wires({ className }: { className?: string }) {
565
566
< div
566
567
aria-hidden = { step !== 2 }
567
568
className = { clsx (
569
+ "[&_pre]:[anchor-name:--response-pre]" ,
568
570
"pointer-events-none absolute inset-0 transition duration-[600ms]" ,
569
571
styles . highlightsResponse ,
570
572
step === 2
@@ -576,6 +578,7 @@ export function Wires({ className }: { className?: string }) {
576
578
>
577
579
< ResponseMdx components = { components } />
578
580
</ div >
581
+ < Curtain />
579
582
</ div >
580
583
)
581
584
}
@@ -586,3 +589,16 @@ function moveHighlightedToTop(index: number | undefined, nodes: ReactNode[]) {
586
589
newNodes . push ( nodes [ index ] as ReactNode )
587
590
return newNodes
588
591
}
592
+
593
+ function Curtain ( ) {
594
+ return (
595
+ < div
596
+ // we obscure part of the rotation with gradient so it's not garish
597
+ className = "pointer-events-none absolute bottom-0 left-[anchor(left)] right-[anchor(right)] z-[2] h-[calc((100%-anchor-size(height))/2)] -translate-x-1/2 [position-anchor:--response-pre] max-md:hidden"
598
+ style = { {
599
+ background :
600
+ "linear-gradient(to bottom, hsl(var(--color-neu-0)/0), hsl(var(--color-neu-0)) 50%)" ,
601
+ } }
602
+ />
603
+ )
604
+ }
You can’t perform that action at this time.
0 commit comments