Hiyve Components - v1.0.0
    Preparing search index...

    Interface FileCommentsPanelProps

    Props for the FileCommentsPanel component.

    The component is fully controlled — consumers provide comment data and handle persistence via callbacks.

    <FileCommentsPanel
    comments={comments}
    localUserId={currentUser.id}
    onAddComment={(content) => saveComment(fileId, content)}
    onDeleteComment={(commentId) => removeComment(fileId, commentId)}
    />
    interface FileCommentsPanelProps {
        colors?: Partial<FileCommentsPanelColors>;
        comments: FileComment[];
        disabled?: boolean;
        fileId?: string;
        icons?: Partial<FileCommentsPanelIcons>;
        labels?: Partial<FileCommentsPanelLabels>;
        localUserId: string;
        maxHeight?: string | number;
        onAddComment: (content: string) => void;
        onClose?: () => void;
        onDeleteComment?: (commentId: string) => void;
        onEditComment?: (commentId: string, content: string) => void;
        onError?: (error: Error) => void;
        placeholder?: string;
        renderProps?: FileCommentsPanelRenderProps;
        showAvatars?: boolean;
        showHeader?: boolean;
        showTimestamps?: boolean;
        styles?: Partial<FileCommentsPanelStyles>;
        sx?: SxProps<Theme>;
        title?: string;
    }
    Index

    Properties

    colors?: Partial<FileCommentsPanelColors>

    Color overrides

    comments: FileComment[]

    Array of comments to display

    disabled?: boolean

    Whether the entire panel is disabled

    fileId?: string

    File ID for context (useful for consumer-side logic)

    icons?: Partial<FileCommentsPanelIcons>

    Icon overrides

    labels?: Partial<FileCommentsPanelLabels>

    Label overrides

    localUserId: string

    Current user's ID for ownership detection

    maxHeight?: string | number

    Maximum height constraint

    onAddComment: (content: string) => void

    Called when the user submits a new comment

    onClose?: () => void

    Called when the close button is clicked (header must be visible)

    onDeleteComment?: (commentId: string) => void

    Called when the user deletes their own comment

    onEditComment?: (commentId: string, content: string) => void

    Called when the user edits their own comment

    onError?: (error: Error) => void

    Error callback for async operations

    placeholder?: string

    Input placeholder text override

    Render prop overrides

    showAvatars?: boolean

    Whether to show avatars

    showHeader?: boolean

    Whether to show the header bar

    showTimestamps?: boolean

    Whether to show timestamps

    styles?: Partial<FileCommentsPanelStyles>

    Style overrides

    sx?: SxProps<Theme>

    MUI sx prop

    title?: string

    Header title override