stream-chat-react
Version:
React components to create chat conversations or livestream style chat
32 lines • 2.6 kB
TypeScript
import type { ComponentPropsWithoutRef } from 'react';
export declare const BASE_FILE_ICON_CLASSNAME: "str-chat__file-icon";
export declare const FILE_ICON_GRAPHIC_CLASSNAME: "str-chat__file-icon__graphic";
/** Add this class (e.g. via className) when hiding the label with CSS to center the icon graphic. */
export declare const FILE_ICON_NO_LABEL_CLASSNAME: "str-chat__file-icon--no-label";
export type FileIconSize = 'sm' | 'md' | 'lg' | 'xl';
export type FileIconSizeConfigEntry = {
width: number;
height: number;
labelX: number;
labelY: number;
};
/** Rendered dimensions (px) and label position in viewBox coords for consistent spacing. */
export declare const FILE_ICON_SIZE_CONFIG: Record<FileIconSize, FileIconSizeConfigEntry>;
/** Merge partial overrides with default config. Use for Chat-level fileIconSizeConfig. */
export declare const mergeFileIconSizeConfig: (overrides?: Partial<Record<FileIconSize, Partial<FileIconSizeConfigEntry>>>) => Record<FileIconSize, FileIconSizeConfigEntry>;
export type BaseFileIconProps = {
label?: string;
/** Resolved size config (defaults from FILE_ICON_SIZE_CONFIG when omitted). Pass sizeConfig on FileIcon or use AttachmentFileIcon to override. */
sizeConfig?: Record<FileIconSize, FileIconSizeConfigEntry>;
size?: FileIconSize;
} & ComponentPropsWithoutRef<'svg'>;
export declare const FilePdfIcon: ({ className, label, size, sizeConfig, ...props }: BaseFileIconProps) => import("react/jsx-runtime").JSX.Element;
export declare const FileWordIcon: ({ className, label, ...props }: BaseFileIconProps) => import("react/jsx-runtime").JSX.Element;
export declare const FilePowerPointIcon: ({ className, label, ...props }: BaseFileIconProps) => import("react/jsx-runtime").JSX.Element;
export declare const FileExcelIcon: ({ className, label, ...props }: BaseFileIconProps) => import("react/jsx-runtime").JSX.Element;
export declare const FileArchiveIcon: ({ className, label, ...props }: BaseFileIconProps) => import("react/jsx-runtime").JSX.Element;
export declare const FileCodeIcon: ({ className, label, ...props }: BaseFileIconProps) => import("react/jsx-runtime").JSX.Element;
export declare const FileAudioIcon: ({ className, label, ...props }: BaseFileIconProps) => import("react/jsx-runtime").JSX.Element;
export declare const FileVideoIcon: ({ className, label, ...props }: BaseFileIconProps) => import("react/jsx-runtime").JSX.Element;
export declare const FileFallbackIcon: ({ className, label, ...props }: BaseFileIconProps) => import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=FileIconSet.d.ts.map