mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-05 07:09:02 +02:00
8024fe2c58
Co-authored-by: Alf Eaton <alf.eaton@overleaf.com> GitOrigin-RevId: 79bb329932b1e6fcc88f648bca9cc4bee215cd41
23 lines
538 B
TypeScript
23 lines
538 B
TypeScript
'use client'
|
|
|
|
import { cn } from '../../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'
|