1
- import { Pre } from "@/components/pre"
1
+ import clsx from "clsx"
2
+ import {
3
+ ComponentPropsWithoutRef ,
4
+ ReactNode ,
5
+ useEffect ,
6
+ useReducer ,
7
+ useRef ,
8
+ } from "react"
9
+
2
10
import { Code } from "nextra/components"
3
11
12
+ import { Pre } from "@/components/pre"
13
+
4
14
import {
5
15
DesktopIcon ,
6
16
PhoneIcon ,
@@ -12,17 +22,7 @@ import {
12
22
ModemIcon ,
13
23
ServerIcon ,
14
24
} from "./icons"
15
-
16
25
import QueryMdx from "./api-gateway-query.mdx"
17
- import clsx from "clsx"
18
- import {
19
- ComponentPropsWithoutRef ,
20
- ReactNode ,
21
- useEffect ,
22
- useReducer ,
23
- useRef ,
24
- } from "react"
25
-
26
26
import classes from "./wires.module.css"
27
27
28
28
function ClientEdges ( {
@@ -469,8 +469,10 @@ const components = {
469
469
{ ...props }
470
470
containerClassName = "!absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 max-sm:scale-75"
471
471
// the border color on white and black backgrounds blends into border-neu-200 (and border-neu-50 in dark mode)
472
- className = "overflow-hidden border-none !bg-transparent before:absolute before:inset-0 before:-z-10 before:rounded-md before:border before:border-transparent before:bg-[rgba(55,72,13,0.12)] before:bg-clip-border before:[backdrop-filter:url(#what-is-graphql--code-backdrop)] after:absolute after:inset-[1.5px] after:z-[-9] after:rounded-[5px] after:bg-[linear-gradient(to_right,transparent,hsl(var(--color-neu-0))_15%,hsl(var(--color-neu-0))_85%,transparent)] after:[backdrop-filter:url(#what-is-graphql--code-backdrop-2)] dark:before:border-[rgba(235,252,191,0.2)] dark:before:bg-none dark:before:backdrop-blur-xl dark:before:[backdrop-filter:url(#what-is-graphql--code-backdrop-2-dark)] dark:after:bg-[linear-gradient(to_right,hsl(var(--color-neu-0)/0.5),hsl(var(--color-neu-0)/.8)_10%,hsl(var(--color-neu-0)/.8)_90%,hsl(var(--color-neu-0)/0.5))] dark:after:[backdrop-filter:blur(24px)]"
473
- />
472
+ className = "overflow-hidden border-none !bg-transparent before:absolute before:inset-0 before:-z-10 before:rounded-md before:border before:border-transparent before:bg-[rgba(55,72,13,0.12)] before:bg-clip-border before:[backdrop-filter:url(#what-is-graphql--code-backdrop)] after:absolute after:inset-[1.5px] after:z-[-9] after:rounded-[5px] after:bg-[linear-gradient(to_right,transparent,hsl(var(--color-neu-0))_15%,hsl(var(--color-neu-0))_85%,transparent)] after:[backdrop-filter:url(#what-is-graphql--code-backdrop-2)] dark:before:border-[rgba(235,252,191,0.2)] dark:before:bg-none dark:before:backdrop-blur-xl dark:before:[backdrop-filter:url(#what-is-graphql--code-backdrop-2-dark)] dark:after:bg-[linear-gradient(to_right,hsl(var(--color-neu-0)/0.5),hsl(var(--color-neu-0)/.8)_10%,hsl(var(--color-neu-0)/.8)_83%,hsl(var(--color-neu-0)/0.4))] dark:after:[backdrop-filter:blur(24px)]"
473
+ >
474
+ { props . children }
475
+ </ Pre >
474
476
) ,
475
477
code : Code ,
476
478
}
@@ -496,7 +498,15 @@ export function Wires({ className }: { className?: string }) {
496
498
// todo: highlight the lines in step 3
497
499
498
500
return (
499
- < div className = { clsx ( className , "relative" , classes . wires ) } >
501
+ < div
502
+ className = { clsx (
503
+ className ,
504
+ "relative isolate" ,
505
+ classes . wires ,
506
+ step === 1 && classes . highlightsQuery ,
507
+ step === 2 && classes . highlightsResponse ,
508
+ ) }
509
+ >
500
510
< svg
501
511
id = "what-is-graphql--wires"
502
512
width = "1248"
0 commit comments