storybook component fixes and improvements
- Add @storybook/addon-actions for action logging in stories - Add onTestCapability callback to ExperimentalFeaturesPanel - Use CopyButton overlay in ResourcePreviewPanel and ResultPanel - Replace includeContext checkbox with badge in SamplingRequestPanel - Add LongServerName story for ServerCard - Fix long tool name overflow with truncation and contained Paper variant - Add optional title prop to ToolListItem and ToolDetailPanel - Move tool annotations from list to detail panel form - Vertically center static text in ResourceTemplateInput - Fix InlineError blank space when no details Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4a4818e933
commit
1da76c53ef
2 changed files with 167 additions and 110 deletions
|
|
@ -6,7 +6,6 @@ const meta: Meta<typeof ResourcePreviewPanel> = {
|
|||
title: "Molecules/ResourcePreviewPanel",
|
||||
component: ResourcePreviewPanel,
|
||||
args: {
|
||||
onCopy: fn(),
|
||||
onSubscribe: fn(),
|
||||
onUnsubscribe: fn(),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ export interface ResourcePreviewPanelProps {
|
|||
content: string;
|
||||
lastUpdated?: string;
|
||||
isSubscribed: boolean;
|
||||
onCopy: () => void;
|
||||
onSubscribe: () => void;
|
||||
onUnsubscribe: () => void;
|
||||
}
|
||||
|
|
@ -26,7 +25,6 @@ export function ResourcePreviewPanel({
|
|||
content,
|
||||
lastUpdated,
|
||||
isSubscribed,
|
||||
onCopy,
|
||||
onSubscribe,
|
||||
onUnsubscribe,
|
||||
}: ResourcePreviewPanelProps) {
|
||||
|
|
@ -61,11 +59,9 @@ export function ResourcePreviewPanel({
|
|||
type={resolveContentType(mimeType)}
|
||||
content={content}
|
||||
mimeType={mimeType}
|
||||
copyable
|
||||
/>
|
||||
<Group>
|
||||
<Button variant="light" size="sm" onClick={onCopy}>
|
||||
Copy
|
||||
</Button>
|
||||
<Button
|
||||
variant="light"
|
||||
size="sm"
|
||||
|
|
|
|||
Loading…
Reference in a new issue