From 7b658fe656b5267f001fc3759530e1bd1babad4d Mon Sep 17 00:00:00 2001 From: Taesu <166604494+bytaesu@users.noreply.github.com> Date: Sat, 21 Mar 2026 01:32:38 +0900 Subject: [PATCH] docs: improve api endpoint component (#8712) --- landing/components/api-method-tabs.tsx | 2 +- landing/components/api-method.tsx | 297 ++++++++++++++----------- landing/components/endpoint.tsx | 24 +- 3 files changed, 186 insertions(+), 137 deletions(-) diff --git a/landing/components/api-method-tabs.tsx b/landing/components/api-method-tabs.tsx index 036bcee7d8..def9c5c1d8 100644 --- a/landing/components/api-method-tabs.tsx +++ b/landing/components/api-method-tabs.tsx @@ -22,7 +22,7 @@ function ApiMethodTabs({ return (
diff --git a/landing/components/api-method.tsx b/landing/components/api-method.tsx index aafee659eb..752568ee82 100644 --- a/landing/components/api-method.tsx +++ b/landing/components/api-method.tsx @@ -183,14 +183,9 @@ export const APIMethod = ({ ); const serverTabContent = ( - <> +
{isClientOnly || isServerOnly ? null : ( - + )} {serverOnlyNote || note ? ( @@ -212,7 +207,7 @@ export const APIMethod = ({ ) : null}
{!isClientOnly ? : null} - +
); if (isExternalOnly) { @@ -234,48 +229,53 @@ export const APIMethod = ({ defaultValue={isServerOnly ? "server" : "client"} className="gap-0 w-full" > - - - + {( + [ + { + value: "client", + label: "Client", + icon: ( + <> + + + + ), + }, + { + value: "server", + label: "Server", + icon: ( + <> + + + + + ), + }, + ] as const + ).map((tab) => ( + - - - - Client - - - - - - - - Server - + + {tab.icon} + + {tab.label} + + ))}