@cometchat/chat-uikit-react-native
Version:
Ready-to-use Chat UI Components for React Native
26 lines (25 loc) • 751 B
TypeScript
import React from "react";
import { BadgeStyle } from "./styles";
/**
* Props for the CometChatBadge component.
*/
export interface CometChatBadgeProps {
/**
* The count to display on the badge.
* If the count exceeds 999, it will be shown as "999+".
*/
count: number | string;
/**
* Custom style for the badge.
*/
style?: Partial<BadgeStyle>;
}
/**
* CometChatBadge component renders the unread message count as a badge.
*
* This component returns a badge with custom styling that displays the number of unread messages.
*
* Props for the component.
* The rendered badge element or null if count is 0.
*/
export declare const CometChatBadge: (props: CometChatBadgeProps) => React.JSX.Element | null;