@sendbird/uikit-react
Version:
Sendbird UIKit for React: A feature-rich and customizable chat UI kit with messaging, channel management, and user authentication.
49 lines (48 loc) • 1.86 kB
TypeScript
import React from 'react';
import './index.scss';
import { GroupChannel } from '@sendbird/chat/groupChannel';
import { User } from '@sendbird/chat';
import { OpenChannel } from '@sendbird/chat/openChannel';
import { UserMessage } from '@sendbird/chat/message';
type MessageInputProps = {
channel: GroupChannel | OpenChannel;
message?: UserMessage;
value?: null | string;
className?: string | string[];
messageFieldId?: string;
isEdit?: boolean;
isMobile?: boolean;
isMentionEnabled?: boolean;
isVoiceMessageEnabled?: boolean;
isSelectingMultipleFilesEnabled?: boolean;
disabled?: boolean;
placeholder?: string;
maxLength?: number;
onFileUpload?: (file: File[]) => void;
onSendMessage?: (params: {
message: string;
mentionTemplate: string;
}) => void;
onUpdateMessage?: (params: {
messageId: number;
message: string;
mentionTemplate: string;
}) => void;
onCancelEdit?: () => void;
onStartTyping?: () => void;
channelUrl?: string;
mentionSelectedUser?: null | User;
onUserMentioned?: (user: User) => void;
onMentionStringChange?: (mentionString: string) => void;
onMentionedUserIdsUpdated?: (mentionedUserIds: string[]) => void;
onVoiceMessageIconClick?: () => void;
onKeyUp?: (event: React.KeyboardEvent<HTMLDivElement>) => boolean;
onKeyDown?: (event: React.KeyboardEvent<HTMLDivElement>) => boolean;
renderVoiceMessageIcon?: () => React.ReactNode;
renderFileUploadIcon?: () => React.ReactNode;
renderSendMessageIcon?: () => React.ReactNode;
setMentionedUsers?: React.Dispatch<React.SetStateAction<User[]>>;
acceptableMimeTypes?: string[];
};
declare const MessageInput: React.ForwardRefExoticComponent<MessageInputProps & React.RefAttributes<HTMLInputElement>>;
export default MessageInput;