UNPKG

@cometchat/chat-uikit-react-native

Version:

Ready-to-use Chat UI Components for React Native

38 lines (37 loc) 1.3 kB
import React from "react"; import { DateHelper } from "../../helper/dateHelper"; import { ValueOf } from "../../helper/types"; import { CometChatTheme } from "../../../theme/type"; /** * Props for the CometChatDateSeparator component. */ export interface CometChatDateSeparatorInterface { /** * Unix epoch time used to display the date. */ timeStamp: number; /** * Pattern for formatting the date. * One of the following values: * - timeFormat: "hh:mm a" * - dayDateFormat: Today, Yesterday, or "d MMM, yyyy" * - dayWeekDayDateTimeFormat: Today (time), weekday, Yesterday, or "dd/mm/yyyy" */ pattern: ValueOf<typeof DateHelper.patterns>; /** * Custom string to be displayed instead of the formatted date. */ customDateString?: string; /** * Custom styles for the date separator component. */ style?: CometChatTheme["dateSeparatorStyles"]; } /** * CometChatDateSeparator is a component that displays a formatted date/time separator * between messages. If a custom date string is provided, it will be displayed instead. * * - Props for the component. * The rendered date separator view. */ export declare const CometChatDateSeparator: (props: CometChatDateSeparatorInterface) => React.JSX.Element;