mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
23 lines
558 B
TypeScript
23 lines
558 B
TypeScript
'use client';
|
|
|
|
import { cn } from '@/lib/utils';
|
|
import { type ComponentProps, memo } from 'react';
|
|
import { Streamdown } from '@soapbox.pub/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';
|