Skip to main content

ConnectMessage

ConnectMessage is a global prompt component used to indicate the status of a Websocket connection,and can only be used in the chat component.

Basic Usage

User can customize text descriptions, icons and buttons for different states of the websocket,the default button is provided to reconnect when the websocket connection is closed, and the user can customize it with the btnNode props.

Api

ConnectMessage

The properties of the ConnectMessage are described as follows:

PropertyDescriptionTypeDefaultrequired
btnNodeSet the custom Button when websocket is closedReact.ReactNode-false
connectDescriptionSet the description when the websocket is connectedstring|React.ReactNode-false
connectIconSet Icon when the websocket is connectedReact.ReactNode-false
closedDescriptionSet the description when the websocket is closedstring|React.ReactNode-false
closedIconSet Icon when the websocket is closedReact.ReactNode-false
openDescriptionSet the description when the websocket is openedstring|React.ReactNode-false
openIconSet Icon when the websocket is openedReact.ReactNode-false
isShowWhether the component is visible or notboolean-false