The MessageModal component is a modal window that can display either a message in Markdown format or a message input field for editing the message.
MessageModal
import { MessageModal } from '@lobehub/ui/chat';
The MessageModal component is a modal window that can display either a message in Markdown format or a message input field for editing the message.
import { MessageModal } from '@lobehub/ui/chat';
Name | Description | Type | Default |
---|---|---|---|
editing | Whether the message is being edited or not | boolean | false |
extra | -- | ReactNode | -- |
height | -- | any | -- |
onChange | Callback fired when message content is changed | (text:string)=>void | -- |
onEditingChange | Callback fired when editing state is changed | (editing:boolean)=>void | -- |
onOpenChange | Callback fired when open state is changed | (open:boolean)=>void | -- |
placeholder | Whether the modal is open or not | string | false |
text | -- | {cancel?:string;confirm?:string;edit?:string;title?:string} | -- |
value | The value of the message content | string | (required) |
footer | -- | any | -- |
open | -- | any | -- |