stream-chat-react
Version:
React components to create chat conversations or livestream style chat
39 lines • 1.53 kB
TypeScript
import React from 'react';
type LegacyReactionOptions = Array<{
Component: React.ComponentType;
type: string;
name?: string;
}>;
type ReactionOptionData = {
Component: React.ComponentType;
name?: string;
unicode?: string;
};
export type ReactionOptions = LegacyReactionOptions | {
quick: {
[key: string]: ReactionOptionData;
};
extended?: {
[key: string]: ReactionOptionData;
};
};
export declare const mapEmojiMartData: (emojiMartData: any) => NonNullable<Exclude<ReactionOptions, LegacyReactionOptions>["extended"]>;
export type AdvancedReactionOptions = {
quick: ReactionOptions;
extended: ReactionOptions;
};
export declare const emojiToUnicode: (emoji: string) => string;
export declare const unicodeToEmoji: (unicode: string) => string;
export declare const defaultReactionOptions: ReactionOptions;
export declare const getHasExtendedReactions: (reactionOptions: ReactionOptions) => boolean;
/**
* Resolves the native emoji character (e.g. "👍") for a given reaction type from
* the configured reaction options. The value is used as the `emoji_code` sent
* with a reaction so that push notifications can render the emoji.
*
* Returns `undefined` when no `unicode` is available for the type (e.g. legacy
* array reaction options or custom options that omit `unicode`).
*/
export declare const getEmojiCodeByReactionType: (reactionOptions: ReactionOptions, reactionType: string) => string | undefined;
export {};
//# sourceMappingURL=reactionOptions.d.ts.map