Add ai-elements

This commit is contained in:
Alex Gleason committed 2025-08-20 16:45:12 -05:00
1 parent e54d050e74
commit b60b7641a5
18 files changed
+2011

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
'use client';
import { cn } from '@/lib/utils';
import { type ComponentProps, memo } from 'react';
import { Streamdown } from 'streamdown';
type ResponseProps = ComponentProps<typeof Streamdown>;
export const Response = memo(
({ className, ...props }: ResponseProps) => (
<Streamdown
className={cn(
'size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0',
className
)}
{...props}
/>
),
(prevProps, nextProps) => prevProps.children === nextProps.children
);
Response.displayName = 'Response';