Fix inconsistent gap between TabsList and TabsContent

This commit is contained in:
Shinya Fujino
2025-04-04 22:39:43 +09:00
parent 3032a67d4e
commit 0fd2e12c7b
6 changed files with 432 additions and 415 deletions

View File

@@ -3,7 +3,8 @@ import { Button } from "@/components/ui/button";
const PingTab = ({ onPingClick }: { onPingClick: () => void }) => { const PingTab = ({ onPingClick }: { onPingClick: () => void }) => {
return ( return (
<TabsContent value="ping" className="grid grid-cols-2 gap-4"> <TabsContent value="ping">
<div className="grid grid-cols-2 gap-4">
<div className="col-span-2 flex justify-center items-center"> <div className="col-span-2 flex justify-center items-center">
<Button <Button
onClick={onPingClick} onClick={onPingClick}
@@ -12,6 +13,7 @@ const PingTab = ({ onPingClick }: { onPingClick: () => void }) => {
Ping Server Ping Server
</Button> </Button>
</div> </div>
</div>
</TabsContent> </TabsContent>
); );
}; };

View File

@@ -84,7 +84,8 @@ const PromptsTab = ({
}; };
return ( return (
<TabsContent value="prompts" className="grid grid-cols-2 gap-4"> <TabsContent value="prompts">
<div className="grid grid-cols-2 gap-4">
<ListPane <ListPane
items={prompts} items={prompts}
listItems={listPrompts} listItems={listPrompts}
@@ -96,7 +97,9 @@ const PromptsTab = ({
renderItem={(prompt) => ( renderItem={(prompt) => (
<> <>
<span className="flex-1">{prompt.name}</span> <span className="flex-1">{prompt.name}</span>
<span className="text-sm text-gray-500">{prompt.description}</span> <span className="text-sm text-gray-500">
{prompt.description}
</span>
</> </>
)} )}
title="Prompts" title="Prompts"
@@ -164,6 +167,7 @@ const PromptsTab = ({
)} )}
</div> </div>
</div> </div>
</div>
</TabsContent> </TabsContent>
); );
}; };

View File

@@ -111,7 +111,8 @@ const ResourcesTab = ({
}; };
return ( return (
<TabsContent value="resources" className="grid grid-cols-3 gap-4"> <TabsContent value="resources">
<div className="grid grid-cols-3 gap-4">
<ListPane <ListPane
items={resources} items={resources}
listItems={listResources} listItems={listResources}
@@ -256,12 +257,14 @@ const ResourcesTab = ({
) : ( ) : (
<Alert> <Alert>
<AlertDescription> <AlertDescription>
Select a resource or template from the list to view its contents Select a resource or template from the list to view its
contents
</AlertDescription> </AlertDescription>
</Alert> </Alert>
)} )}
</div> </div>
</div> </div>
</div>
</TabsContent> </TabsContent>
); );
}; };

View File

@@ -35,7 +35,8 @@ const RootsTab = ({
}; };
return ( return (
<TabsContent value="roots" className="space-y-4"> <TabsContent value="roots">
<div className="space-y-4">
<Alert> <Alert>
<AlertDescription> <AlertDescription>
Configure the root directories that the server can access Configure the root directories that the server can access
@@ -70,6 +71,7 @@ const RootsTab = ({
Save Changes Save Changes
</Button> </Button>
</div> </div>
</div>
</TabsContent> </TabsContent>
); );
}; };

View File

@@ -33,7 +33,8 @@ const SamplingTab = ({ pendingRequests, onApprove, onReject }: Props) => {
}; };
return ( return (
<TabsContent value="sampling" className="h-96"> <TabsContent value="sampling">
<div className="h-96">
<Alert> <Alert>
<AlertDescription> <AlertDescription>
When the server requests LLM sampling, requests will appear here for When the server requests LLM sampling, requests will appear here for
@@ -50,7 +51,9 @@ const SamplingTab = ({ pendingRequests, onApprove, onReject }: Props) => {
/> />
<div className="flex space-x-2"> <div className="flex space-x-2">
<Button onClick={() => handleApprove(request.id)}>Approve</Button> <Button onClick={() => handleApprove(request.id)}>
Approve
</Button>
<Button variant="outline" onClick={() => onReject(request.id)}> <Button variant="outline" onClick={() => onReject(request.id)}>
Reject Reject
</Button> </Button>
@@ -61,6 +64,7 @@ const SamplingTab = ({ pendingRequests, onApprove, onReject }: Props) => {
<p className="text-gray-500">No pending requests</p> <p className="text-gray-500">No pending requests</p>
)} )}
</div> </div>
</div>
</TabsContent> </TabsContent>
); );
}; };

View File

@@ -106,7 +106,8 @@ const ToolsTab = ({
}; };
return ( return (
<TabsContent value="tools" className="grid grid-cols-2 gap-4"> <TabsContent value="tools">
<div className="grid grid-cols-2 gap-4">
<ListPane <ListPane
items={tools} items={tools}
listItems={listTools} listItems={listTools}
@@ -249,6 +250,7 @@ const ToolsTab = ({
)} )}
</div> </div>
</div> </div>
</div>
</TabsContent> </TabsContent>
); );
}; };