@@ -5,6 +5,9 @@ import { useState } from "react"
5
5
6
6
import { Button } from "@/app/conf/_design-system/button"
7
7
import ArrowRightIcon from "./arrow-right.svg?svgr"
8
+ import { StripesDecoration } from "@/app/conf/_design-system/stripes-decoration"
9
+
10
+ import blurBean from "./blur-bean.webp"
8
11
9
12
type UseCase = {
10
13
label : string
@@ -64,36 +67,36 @@ export function UseCases({
64
67
{ ...props }
65
68
>
66
69
< div className = "mx-auto flex max-w-[1440px] *:basis-1/2 max-lg:flex-col 3xl:min-h-[800px]" >
67
- < div className = "relative flex flex-col border-sec-dark bg-sec-light p-4 lg:border-r lg:p-8 xl:p-16" >
70
+ < div className = "relative flex flex-col bg-sec-light p-4 dark:bg-neu-50 dark:text-neu-900 lg:p-8 xl:p-16" >
68
71
< h2 className = "typography-h2" > Is GraphQL right for me?</ h2 >
69
- < p className = "typography-body-lg mt-6 text-neu-800" >
72
+ < p className = "typography-body-lg mt-6 text-balance text- neu-800" >
70
73
Choose a use case most relevant for your project and learn how
71
74
GraphQL can help you build faster, modern solutions.
72
75
</ p >
73
76
74
77
< div className = "3xl:flex-1" />
75
- < ul className = "mt-8 divide-y divide-sec-dark border border-sec-dark" >
78
+ < ul className = "mt-8 divide-y divide-sec-dark border border-sec-dark lg:mt-16 " >
76
79
{ USE_CASES . map ( ( useCase , i ) => (
77
80
< li key = { useCase . label } >
78
81
< button
79
82
type = "button"
80
83
onClick = { ( ) => setSelectedIndex ( i ) }
81
84
aria-selected = { i === selectedIndex ? "true" : undefined }
82
- className = "flex w-full items-center justify-between gap-6 px-3 py-4 text-left transition-colors hover:bg-sec-lighter aria-selected:bg-sec-base aria-selected:hover:bg-sec-lighter"
85
+ className = "group flex w-full items-center justify-between gap-6 px-3 py-4 text-left transition-colors hover:bg-sec-lighter aria-selected:bg-sec-base aria-selected:hover:bg-sec-lighter hover:dark:bg-neu-100/25 dark:aria-selected:bg-sec-darker "
83
86
>
84
87
< span className = "typography-body-lg" > { useCase . label } </ span >
85
- < ArrowRightIcon className = "size-10 shrink-0 text-sec-dark opacity-0 group-aria-selected:opacity-100" />
88
+ < ArrowRightIcon className = "size-10 shrink-0 text-sec-dark opacity-0 transition-opacity group-hover:opacity-100 group- aria-selected:opacity-100 dark:text-neu-900 " />
86
89
</ button >
87
90
</ li >
88
91
) ) }
89
92
</ ul >
90
93
< div className = "3xl:flex-1" />
91
94
</ div >
92
95
93
- < article className = "relative flex h-auto flex-col bg-sec-base p-8 md:p-12 lg:p-16" >
96
+ < article className = "relative flex h-auto flex-col bg-sec-base p-8 dark:bg-sec-darker md:p-12 lg:p-16" >
94
97
< Stripes />
95
98
< div className = "z-10 my-auto max-h-[528px] max-w-2xl" >
96
- < h3 className = "typography-body-lg text-sec-darker" >
99
+ < h3 className = "typography-body-lg text-sec-darker dark:text-sec-lighter " >
97
100
{ selected . label }
98
101
</ h3 >
99
102
< p className = "typography-h3 mt-10 text-neu-800" >
@@ -112,41 +115,24 @@ export function UseCases({
112
115
)
113
116
}
114
117
115
- const maskEven =
116
- "repeating-linear-gradient(to right, transparent, transparent 12px, black 12px, black 24px)"
117
- const maskOdd =
118
- "repeating-linear-gradient(to right, black, black 12px, transparent 12px, transparent 24px)"
119
-
120
118
function Stripes ( ) {
121
- const mask = "linear-gradient(125deg, transparent 68%, hsl(0 0 0 / 0.8))"
119
+ const mask = `url( ${ blurBean . src } )`
122
120
return (
123
121
< div
124
122
role = "presentation"
125
- className = "pointer-events-none absolute inset-0 bottom-[-20px] -z-10 translate-x-0.5 translate-y-12 ease-linear max-lg:hidden "
123
+ className = "pointer-events-none absolute inset-0"
126
124
style = { {
127
125
maskImage : mask ,
128
126
WebkitMaskImage : mask ,
127
+ maskPosition : "bottom 150% right 50%" ,
128
+ WebkitMaskPosition : "bottom 150% right 50%" ,
129
+ maskRepeat : "no-repeat" ,
130
+ WebkitMaskRepeat : "no-repeat" ,
129
131
} }
130
132
>
131
- < div
132
- className = "absolute inset-0"
133
- style = { {
134
- maskImage : maskOdd ,
135
- WebkitMaskImage : maskOdd ,
136
- maskPosition : "right" ,
137
- backgroundImage :
138
- "linear-gradient(0deg, hsl(var(--color-sec-lighter)) 0%, rgba(133, 185, 19, 0.00) 100%)" ,
139
- } }
140
- />
141
- < div
142
- className = "absolute inset-0"
143
- style = { {
144
- maskImage : maskEven ,
145
- WebkitMaskImage : maskEven ,
146
- maskPosition : "right" ,
147
- backgroundImage :
148
- "linear-gradient(0deg, hsl(var(--color-sec-dark)) 0%, hsl(var(--color-sec-base)) 100%)" ,
149
- } }
133
+ < StripesDecoration
134
+ evenClassName = "bg-[linear-gradient(0deg,_hsl(var(--color-sec-dark))_0%,_hsl(var(--color-sec-base))_100%)] dark:bg-[linear-gradient(0deg,_hsl(var(--color-sec-dark))_0%,_hsl(var(--color-sec-darker))_100%)]"
135
+ oddClassName = "bg-[linear-gradient(0deg,_hsl(var(--color-sec-lighter))_0%,_hsl(79_81%_40%/0)_100%)] dark:bg-[linear-gradient(0deg,_hsl(var(--color-neu-dark))_0%,_rgba(133,185,19,0.00)_100%)]"
150
136
/>
151
137
</ div >
152
138
)
0 commit comments