UNPKG

@cometchat/chat-uikit-react-native

Version:

Ready-to-use Chat UI Components for React Native

66 lines (63 loc) 1.75 kB
//@ts-ignore import waiting from './resources/sending.png'; //@ts-ignore import greyTick from './resources/grey-tick-icon.png'; //@ts-ignore import greyDoubleTick from './resources/grey-double-tick-icon.png'; //@ts-ignore import blueDoubleTick from './resources/blue-double-tick-icon.png'; //@ts-ignore import errorTick from './resources/error.png'; import { ImageType } from '../../base'; /** * @class ReceiptConfiguration * @description ReceiptConfiguration class is used for defining the MessageReceipt template. */ export class ReceiptConfiguration { waitIcon?: ImageType; sentIcon?: ImageType; readIcon?: ImageType; deliveredIcon?: ImageType; errorIcon?: ImageType; style?: { height?: string | number; width?: string | number; tintColor?: string } /** * * @param {Object} param0 * @field {any} waitIcon - icon for Wait * @field {any} sentIcon - icon for Sent * @field {any} readIcon - icon for Read * @field {any} deliveredIcon - icon for Delivered * @field {any} errorIcon - icon for Error */ constructor({ waitIcon = waiting, sentIcon = greyTick, readIcon = greyDoubleTick, deliveredIcon = blueDoubleTick, errorIcon = errorTick, style, }: ReceiptConfigurationInterface) { this.waitIcon = waitIcon; this.sentIcon = sentIcon; this.readIcon = readIcon; this.deliveredIcon = deliveredIcon; this.errorIcon = errorIcon; this.style = style; } } export interface ReceiptConfigurationInterface { waitIcon?: ImageType; sentIcon?: ImageType; readIcon?: ImageType; deliveredIcon?: ImageType; errorIcon?: ImageType; style?: { height?: string | number; width?: string | number; tintColor?: string; } }