UNPKG

@assistant-ui/react

Version:

Open-source TypeScript/React library for building production-grade AI chat experiences

31 lines • 1.28 kB
import { Primitive } from "../../utils/Primitive.js"; import { type ComponentRef, type ComponentPropsWithoutRef } from "react"; export declare namespace MessagePartPrimitiveImage { type Element = ComponentRef<typeof Primitive.img>; /** * Props for the MessagePartPrimitive.Image component. * Accepts all standard img element props. */ type Props = ComponentPropsWithoutRef<typeof Primitive.img>; } /** * Renders an image from the current message part context. * * This component displays image content from the current message part, * automatically setting the src attribute from the message part's image data. * * @example * ```tsx * <MessagePartPrimitive.Image * alt="Generated image" * className="message-image" * style={{ maxWidth: '100%' }} * /> * ``` */ export declare const MessagePartPrimitiveImage: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & { asChild?: boolean | undefined; }, "ref"> & { render?: import("react").ReactElement | undefined; } & import("react").RefAttributes<HTMLImageElement>, "ref"> & import("react").RefAttributes<HTMLImageElement>>; //# sourceMappingURL=MessagePartImage.d.ts.map