@@ -63,85 +63,39 @@ export default function DocCard({
6363
6464 const card = (
6565 < div
66- style = { {
67- padding : 20 ,
68- borderRadius : 12 ,
69- background : "var(--cs-surface)" ,
70- border : "1px solid var(--cs-border)" ,
71- display : "flex" ,
72- flexDirection : "column" ,
73- gap : 12 ,
74- height : "100%" ,
75- boxSizing : "border-box" ,
76- textDecoration : "none" ,
77- color : "inherit" ,
78- transition : href ? "border-color 0.15s, box-shadow 0.15s" : undefined ,
79- } }
66+ className = { `p-5 rounded-xl bg-cs-surface border border-cs-border flex flex-col gap-3 h-full${ href ? " transition-[border-color,box-shadow] duration-150" : "" } ` }
8067 >
8168 { /* Header: icon + title + premium badge */ }
82- < div style = { { display : "flex" , alignItems : "flex -start" , gap : 12 } } >
69+ < div className = "flex items -start gap-3" >
8370 { resolvedIcon && (
8471 < div
72+ className = "w-9 h-9 rounded-[9px] flex items-center justify-center shrink-0"
8573 style = { {
86- width : 36 ,
87- height : 36 ,
88- borderRadius : 9 ,
8974 background : mix ( color , 14 ) ,
9075 border : `1px solid ${ mix ( color , 28 ) } ` ,
91- display : "flex" ,
92- alignItems : "center" ,
93- justifyContent : "center" ,
9476 color,
95- flexShrink : 0 ,
9677 } }
9778 >
98- < div style = { { width : 17 , height : 17 , display : " flex" } } > { resolvedIcon } </ div >
79+ < div className = "w-[17px] h-[17px] flex"> { resolvedIcon } </ div >
9980 </ div >
10081 ) }
101- < div style = { { flex : 1 , minWidth : 0 } } >
82+ < div className = " flex-1 min-w-0" >
10283 { badge && (
10384 < div
85+ className = "inline-flex self-start px-2 py-[2px] rounded-full font-cs-mono text-[9.5px] tracking-[0.08em] font-semibold mb-1.5"
10486 style = { {
105- display : "inline-flex" ,
106- alignSelf : "flex-start" ,
107- padding : "2px 8px" ,
108- borderRadius : 100 ,
109- fontFamily : "var(--cs-font-mono)" ,
110- fontSize : 9.5 ,
111- letterSpacing : "0.08em" ,
112- fontWeight : 600 ,
11387 color,
11488 border : `1px solid ${ mix ( color , 30 ) } ` ,
11589 background : mix ( color , 10 ) ,
116- marginBottom : 6 ,
11790 } }
11891 >
11992 { badge }
12093 </ div >
12194 ) }
122- < div
123- style = { {
124- display : "flex" ,
125- alignItems : "center" ,
126- gap : 8 ,
127- flexWrap : "wrap" ,
128- } }
129- >
130- < div style = { { fontSize : 15 , fontWeight : 600 , color : "var(--cs-ink)" , lineHeight : 1.3 } } > { title } </ div >
95+ < div className = "flex items-center gap-2 flex-wrap" >
96+ < div className = "text-[15px] font-semibold text-cs-ink leading-[1.3]" > { title } </ div >
13197 { premium && (
132- < span
133- style = { {
134- fontFamily : "var(--cs-font-mono)" ,
135- fontSize : 9.5 ,
136- letterSpacing : "0.08em" ,
137- textTransform : "uppercase" ,
138- padding : "2px 6px" ,
139- borderRadius : 4 ,
140- background : mix ( "var(--cs-orange)" , 14 ) ,
141- color : "var(--cs-orange)" ,
142- fontWeight : 600 ,
143- } }
144- >
98+ < span className = "font-cs-mono text-[9.5px] tracking-[0.08em] uppercase px-[6px] py-[2px] rounded bg-[color-mix(in_srgb,var(--cs-orange)_14%,transparent)] text-cs-orange font-semibold" >
14599 Premium
146100 </ span >
147101 ) }
@@ -150,58 +104,28 @@ export default function DocCard({
150104 </ div >
151105
152106 { /* Description */ }
153- { desc && < div style = { { fontSize : 13.5 , color : "var(-- cs-ink-dim)" , lineHeight : 1.55 , flex : 1 } } > { desc } </ div > }
107+ { desc && < div className = "text-[ 13.5px] text- cs-ink-dim leading-[ 1.55] flex-1" > { desc } </ div > }
154108
155109 { /* Extra content slot */ }
156- { children && < div style = { { flex : 1 } } > { children } </ div > }
110+ { children && < div className = " flex-1" > { children } </ div > }
157111
158112 { /* Command block */ }
159113 { command && (
160- < div
161- style = { {
162- padding : "9px 12px" ,
163- borderRadius : 8 ,
164- background : "var(--cs-bg)" ,
165- border : "1px solid var(--cs-border)" ,
166- fontFamily : "var(--cs-font-mono)" ,
167- fontSize : 12 ,
168- color,
169- display : "flex" ,
170- alignItems : "center" ,
171- gap : 10 ,
172- } }
173- >
174- < span style = { { color : "var(--cs-ink-mute)" , userSelect : "none" } } > $</ span >
175- < span
176- style = { {
177- flex : 1 ,
178- overflow : "hidden" ,
179- textOverflow : "ellipsis" ,
180- whiteSpace : "nowrap" ,
181- color : "var(--cs-ink)" ,
182- } }
183- >
184- { command }
185- </ span >
114+ < div className = "py-[9px] px-3 rounded-lg bg-cs-bg border border-cs-border font-cs-mono text-xs flex items-center gap-[10px]" >
115+ < span className = "text-cs-ink-mute select-none" > $</ span >
116+ < span className = "flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-cs-ink" > { command } </ span >
186117 </ div >
187118 ) }
188119
189120 { /* Link list */ }
190121 { links && links . length > 0 && (
191- < div style = { { display : "flex" , flexDirection : "column" , gap : 5 , marginTop : 4 } } >
122+ < div className = "flex flex-col gap-[5px] mt-1" >
192123 { links . map ( ( l ) => (
193124 < a
194125 key = { l . href }
195126 href = { l . href }
196- style = { {
197- fontSize : 12.5 ,
198- fontWeight : 600 ,
199- color,
200- textDecoration : "none" ,
201- display : "inline-flex" ,
202- alignItems : "center" ,
203- gap : 4 ,
204- } }
127+ className = "text-[12.5px] font-semibold no-underline inline-flex items-center gap-1"
128+ style = { { color } }
205129 >
206130 { l . label }
207131 { l . external ? < ExternalArrow /> : < ArrowRight /> }
@@ -212,26 +136,8 @@ export default function DocCard({
212136
213137 { /* CTA — explicit label, or auto arrow footer for href-only clickable cards */ }
214138 { href && ( ctaLabel || ( ! links ?. length && ! command ) ) && (
215- < div
216- style = { {
217- marginTop : "auto" ,
218- paddingTop : 12 ,
219- borderTop : "1px dashed var(--cs-border)" ,
220- display : "flex" ,
221- alignItems : "center" ,
222- justifyContent : "space-between" ,
223- } }
224- >
225- < span
226- style = { {
227- fontSize : 12.5 ,
228- fontWeight : 600 ,
229- color,
230- display : "inline-flex" ,
231- alignItems : "center" ,
232- gap : 5 ,
233- } }
234- >
139+ < div className = "mt-auto pt-3 border-t border-dashed border-cs-border flex items-center justify-between" >
140+ < span className = "text-[12.5px] font-semibold inline-flex items-center gap-[5px]" style = { { color } } >
235141 { ctaLabel ?? title } < ArrowRight />
236142 </ span >
237143 </ div >
@@ -241,7 +147,7 @@ export default function DocCard({
241147
242148 if ( href && ! ctaLabel && ! links ) {
243149 return (
244- < a href = { href } style = { { textDecoration : "none" , display : " block" } } >
150+ < a href = { href } className = "no-underline block">
245151 { card }
246152 </ a >
247153 ) ;
0 commit comments