UNPKG

stream-chat-react

Version:

React components to create chat conversations or livestream style chat

24 lines (23 loc) 1.1 kB
import React from 'react'; import type { PropsWithChildren } from 'react'; import type { SearchController } from 'stream-chat'; export type SearchContextValue = { /** The type of channel to create on user result select, defaults to `messaging` */ directMessagingChannelType: string; /** Instance of the search controller that handles the data management */ searchController: SearchController; /** Sets the input element into disabled state */ disabled?: boolean; /** Clear search state / results on every click outside the search input, defaults to true */ exitSearchOnInputBlur?: boolean; /** Custom placeholder text to be displayed in the search input */ placeholder?: string; }; export declare const SearchContext: React.Context<SearchContextValue | undefined>; /** * Context provider for components rendered within the `Search` component */ export declare const SearchContextProvider: ({ children, value, }: PropsWithChildren<{ value: SearchContextValue; }>) => React.JSX.Element; export declare const useSearchContext: () => SearchContextValue;