Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如果可以的话,想要关于hooks的更详细的文档,比如useMessages当中的initialState具体能写什么。 #27

Closed
honeysuckcle opened this issue Apr 9, 2021 · 1 comment

Comments

@honeysuckcle
Copy link

What problem does this feature solve?

Describe the solution you'd like

What does the proposed API look like?

@akai
Copy link
Collaborator

akai commented Apr 12, 2021

export type MessageProps = {
/**
* 唯一ID
*/
_id: MessageId;
/**
* 消息类型
*/
type: string;
/**
* 消息内容
*/
content: any; // FIXME
/**
* 消息创建时间
*/
createdAt?: number;
/**
* 消息发送者信息
*/
user?: User;
/**
* 消息位置
*/
position?: 'left' | 'right' | 'center';
/**
* 是否显示时间
*/
hasTime?: boolean;
/**
* 消息内容渲染函数
*/
renderMessageContent?: (message: MessageProps) => void;
};

@akai akai closed this as completed Apr 12, 2021
captainstdin pushed a commit to captainstdin/ChatUI that referenced this issue May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants