stream-chat-react
Version:
React components to create chat conversations or livestream style chat
19 lines (18 loc) • 998 B
TypeScript
import React from 'react';
import type { Action, Attachment } from 'stream-chat';
import type { ActionHandlerReturnType } from '../Message/hooks/useActionHandler';
import type { DefaultStreamChatGenerics } from '../../types/types';
export type AttachmentActionsProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Attachment<StreamChatGenerics> & {
/** A list of actions */
actions: Action[];
/** Unique id for action button key. Key is generated by concatenating this id with action value - {`${id}-${action.value}`} */
id: string;
/** The text for the form input */
text: string;
/** Click event handler */
actionHandler?: ActionHandlerReturnType;
};
/**
* A component for rendering the actions you can take on an attachment.
*/
export declare const AttachmentActions: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(props: AttachmentActionsProps<StreamChatGenerics>) => React.JSX.Element;