forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathframe.tsx
More file actions
30 lines (29 loc) · 767 Bytes
/
Copy pathframe.tsx
File metadata and controls
30 lines (29 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import React from "react";
export function Frame({
children,
className,
description,
}: {
children: React.ReactNode;
className: string;
description?: string;
}) {
return (
<>
<div
className={`flex space-x-4 w-full mx-auto justify-center ${className}`}
>
{React.Children.map(children, (child) =>
React.isValidElement(child)
? React.cloneElement(child as React.ReactElement<any>, {
className: `border border-foreground-muted rounded-md shadow-lg ${
child.props.className || ""
}`,
})
: child
)}
</div>
{description && <p className="text-sm text-neutral-500 text-center">{description}</p>}
</>
);
}