stream-chat-react
Version:
React components to create chat conversations or livestream style chat
23 lines • 1.19 kB
TypeScript
import type { Action, Attachment } from 'stream-chat';
import type { ActionHandlerReturnType } from '../Message/hooks/useActionHandler';
export type AttachmentActionsProps = Attachment & {
/** 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;
/** Which action should be focused on initial render (match by action.value) */
defaultFocusedActionValue?: string;
};
export type AttachmentActionsDefaultFocusByType = Partial<Record<NonNullable<Attachment['type']>, string>>;
export declare const defaultAttachmentActionsDefaultFocus: AttachmentActionsDefaultFocusByType;
declare const UnMemoizedAttachmentActions: (props: AttachmentActionsProps) => import("react/jsx-runtime").JSX.Element;
/**
* A component for rendering the actions you can take on an attachment.
*/
export declare const AttachmentActions: typeof UnMemoizedAttachmentActions;
export {};
//# sourceMappingURL=AttachmentActions.d.ts.map