import React from "react";
export function Frame({
children,
className,
description,
}: {
children: React.ReactNode;
className?: string;
description?: string;
}) {
return (
<>
{React.Children.map(children, (child) =>
React.isValidElement(child)
? React.cloneElement(child as React.ReactElement
, {
className: `border border-foreground-muted rounded-md shadow-lg ${
child.props.className || ""
}`,
})
: child
)}
{description && {description}
}
>
);
}