@sendbird/uikit-react
Version:
Sendbird UIKit for React: A feature-rich and customizable chat UI kit with messaging, channel management, and user authentication.
41 lines (40 loc) • 1.73 kB
TypeScript
import React, { MouseEvent, ReactNode } from 'react';
import type { EmojiContainer } from '@sendbird/chat';
import type { GroupChannel } from '@sendbird/chat/groupChannel';
import type { OpenChannel } from '@sendbird/chat/openChannel';
import { CoreMessageType, SendableMessageType } from '../../utils';
import { ReplyType } from '../../types';
import type { RenderMenuItemsParams } from '../MessageMenu/MessageMenu';
export type DeleteMenuStates = 'DISABLE' | 'HIDE' | 'ACTIVE';
type MobileRenderMenuItemsParams = {
items: Omit<RenderMenuItemsParams['items'], 'OpenInChannelMenuItem'>;
};
export interface BaseMenuProps {
channel: GroupChannel | OpenChannel;
message: SendableMessageType;
userId: string;
hideMenu(): void;
isByMe?: boolean;
replyType?: ReplyType;
disabled?: boolean;
deleteMenuState?: DeleteMenuStates;
showEdit?: (bool: boolean) => void;
showRemove?: (bool: boolean) => void;
resendMessage?: (message: SendableMessageType) => void;
deleteMessage?: (message: CoreMessageType) => Promise<void>;
markAsUnread?: (message: SendableMessageType) => void;
setQuoteMessage?: (message: SendableMessageType) => void;
isReactionEnabled?: boolean;
parentRef?: React.RefObject<HTMLElement>;
onReplyInThread?: (props: {
message: SendableMessageType;
}) => void;
isOpenedFromThread?: boolean;
onDownloadClick?: (e: MouseEvent) => Promise<void>;
renderMenuItems?: (params: MobileRenderMenuItemsParams) => ReactNode;
}
export interface MobileBottomSheetProps extends BaseMenuProps {
emojiContainer?: EmojiContainer;
toggleReaction?: (message: SendableMessageType, reactionKey: string, isReacted: boolean) => void;
}
export {};