import { forwardRef } from "react"; /** * Message - AI prompt input * * id: string - textarea id, used for the sr-only label (default: "message-ai") * value: string - controlled textarea value * onChange: function - textarea change handler * placeholder: string (default: "Type your message...") * disabled: boolean * hint: string | ReactNode - subtext shown below the component * attachments: ReactNode - rendered in the header slot above the textarea * onAttach: function - attach button click handler * onDictate: function - dictate button click handler * onSend: function - send button click handler */ const Message = forwardRef(function Message( { id = "message-ai", value = "", onChange, placeholder = "Type your message...", disabled = false, hint = "AI can make mistakes. Don't type in personal information.", attachments, onAttach, onDictate, onSend, className = "", ...props }, ref ) { const classes = [ "prs-message", className, ] .filter(Boolean) .join(" "); return (
{attachments &&
{attachments}
}