@@ -10,11 +10,11 @@ interface Props {
1010const { endpoint } = Astro .props ;
1111
1212const methodColors: Record <string , string > = {
13- GET: " bg-green-100 text-green-800 " ,
14- POST: " bg-blue-100 text-blue-800 " ,
15- PUT: " bg-yellow-100 text-yellow-800 " ,
16- PATCH: " bg-orange-100 text-orange-800 " ,
17- DELETE: " bg-red-100 text-red-800 " ,
13+ GET: " bg-(--status- green-bg) text-(--status- green-text) " ,
14+ POST: " bg-(--status- blue-bg) text-(--status- blue-text) " ,
15+ PUT: " bg-(--status- yellow-bg) text-(--status- yellow-text) " ,
16+ PATCH: " bg-(--status- orange-bg) text-(--status- orange-text) " ,
17+ DELETE: " bg-(--status- red-bg) text-(--status- red-text) " ,
1818};
1919
2020// Get example response from first successful response
@@ -32,13 +32,11 @@ const exampleResponse =
3232 <!-- Method and Path -->
3333 <div class =" flex items-center gap-3" >
3434 <span
35- class ={ ` rounded px-2 py-1 text-xs font-bold ${methodColors [endpoint .method ] || " bg-navy-100 text-navy-800 " } ` }
35+ class ={ ` rounded px-2 py-1 text-xs font-bold ${methodColors [endpoint .method ] || " bg-(--surface-subtle) text-(--text) " } ` }
3636 >
3737 { endpoint .method }
3838 </span >
39- <span class =" font-mono text-sm text-navy-900"
40- >{ API_HOST } { endpoint .path } </span
41- >
39+ <span class =" font-mono text-sm" >{ API_HOST } { endpoint .path } </span >
4240 </div >
4341
4442 <!-- Summary and Description -->
@@ -52,7 +50,7 @@ const exampleResponse =
5250 <h4 class = " mb-0 text-lg" >Parameters</h4 >
5351 <div class = " overflow-x-auto" >
5452 <table class = " w-full text-sm" >
55- <thead class = " bg-navy-50 " >
53+ <thead class = " bg-(--surface-subtle) " >
5654 <tr >
5755 <th class = " w-32 px-3 py-2 text-left" >Name</th >
5856 <th class = " w-20 px-3 py-2 text-left" >Location</th >
@@ -61,12 +59,12 @@ const exampleResponse =
6159 <th class = " px-3 py-2 text-left" >Description</th >
6260 </tr >
6361 </thead >
64- <tbody class = " divide-y divide-navy-100 " >
62+ <tbody class = " divide-y divide-(--border-subtle) " >
6563 { endpoint .parameters .map ((param ) => (
6664 <tr >
6765 <td class = " px-3 py-2 font-mono" >{ param .name } </td >
6866 <td class = " px-3 py-2" >
69- <span class = " rounded bg-navy-100 px-2 py-1 text-xs" >
67+ <span class = " rounded bg-(--surface-subtle) px-2 py-1 text-xs" >
7068 { param .in }
7169 </span >
7270 </td >
@@ -82,7 +80,9 @@ const exampleResponse =
8280 <span class = " text-navy-400" >—</span >
8381 )}
8482 </td >
85- <td class = " px-3 py-2 text-navy-600" >{ param .description } </td >
83+ <td class = " px-3 py-2 text-(--text-secondary)" >
84+ { param .description }
85+ </td >
8686 </tr >
8787 ))}
8888 </tbody >
@@ -97,7 +97,7 @@ const exampleResponse =
9797 exampleResponse && (
9898 <div >
9999 <h4 >Example Response</h4 >
100- <div class = " overflow-x-auto rounded-lg bg-navy-900 p-4 text-white" >
100+ <div class = " bg-navy-900 overflow-x-auto rounded-lg p-4 text-white" >
101101 <pre class = " text-sm" >
102102 <code >{ JSON .stringify (exampleResponse , null , 2 )} </code >
103103 </pre >
0 commit comments