UNPKG

@cobuildlab/8base-chat

Version:

Chat component that uses 8base

25 lines (24 loc) 878 B
/// <reference types="react" /> import { IUser } from 'types'; import { ChannelMemberFilter } from '../../shared/graphql/__generated__'; export interface IChannel { channelIdentityId?: string; } export interface ITab extends IChannel { isCollapsed?: boolean; } export declare type SetState<T> = (newState: T | ((oldState: T) => T), callback?: () => any) => void; export declare type SetChannel = SetState<IChannel | null>; export declare type SetTabs = SetState<ITab[]>; export interface IChatContext { setChannel: SetChannel; setTabs: SetTabs; openedChannel: IChannel | null; user: IUser | null; tabs: ITab[]; isSidebarVisible: boolean; setSidebarVisibility?: (isVisible: boolean) => void; usersFilter: {} | null; channelMembersFilter?: ChannelMemberFilter; } export declare const ChatContext: import("react").Context<IChatContext>;