UNPKG

@sanity/preview-kit

Version:

General purpose utils for live content and visual editing

33 lines (28 loc) 934 B
import type {QueryParams} from '@sanity/client' /** * Browser-only preview component, overwrites the data prop with live data on-demand * @public */ declare function LiveQueryClientComponent< QueryResult, QueryParams extends QueryParams = QueryParams, >(props: LiveQueryClientComponentProps<QueryResult, QueryParams>): React.ReactNode declare namespace LiveQueryClientComponent { var displayName: string } export {LiveQueryClientComponent} export default LiveQueryClientComponent /** @public */ export declare interface LiveQueryClientComponentProps<QueryResult, QueryParams> { children?: React.ReactNode | undefined /** * If a parent <LiveQueryProvider> is missing, then an error is thrown. * If you want to disable this behavior, set this prop to false. * @defaultValue true */ throwOnMissingProvider?: boolean initialData: QueryResult query: string params?: QueryParams | undefined } export {}