Skip to content

Commit ce1606a

Browse files
committed
Resolves #340
1 parent a80dc86 commit ce1606a

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.changeset/modern-insects-feel.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"ai-elements": patch
3+
---
4+
5+
Fix Tool padding

packages/elements/src/tool.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export type ToolContentProps = ComponentProps<typeof CollapsibleContent>;
106106
export const ToolContent = ({ className, ...props }: ToolContentProps) => (
107107
<CollapsibleContent
108108
className={cn(
109-
"data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",
109+
"data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 space-y-4 p-4 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",
110110
className
111111
)}
112112
{...props}
@@ -118,7 +118,7 @@ export type ToolInputProps = ComponentProps<"div"> & {
118118
};
119119

120120
export const ToolInput = ({ className, input, ...props }: ToolInputProps) => (
121-
<div className={cn("space-y-2 overflow-hidden p-4", className)} {...props}>
121+
<div className={cn("space-y-2 overflow-hidden", className)} {...props}>
122122
<h4 className="font-medium text-muted-foreground text-xs uppercase tracking-wide">
123123
Parameters
124124
</h4>
@@ -154,7 +154,7 @@ export const ToolOutput = ({
154154
}
155155

156156
return (
157-
<div className={cn("space-y-2 p-4", className)} {...props}>
157+
<div className={cn("space-y-2", className)} {...props}>
158158
<h4 className="font-medium text-muted-foreground text-xs uppercase tracking-wide">
159159
{errorText ? "Error" : "Result"}
160160
</h4>

0 commit comments

Comments
 (0)