createInstantSearch and createIndex should accept props

This commit is contained in:
Gordon
2018-10-18 09:28:07 -05:00
parent ba7d277033
commit 93c4e10773
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ import * as React from 'react';
export function createInstantSearch(
defaultAlgoliaClient: (appId: string, apiKey: string, options: { _useRequestCache: boolean }) => object,
root: object
): React.ComponentClass;
): React.ComponentClass<any>;
/**
* Creates a specialized root Index component. It accepts
@@ -26,7 +26,7 @@ export function createInstantSearch(
* @param defaultRoot - the defininition of the root of an Index sub tree.
* @return a Index root
*/
export function createIndex(defaultRoot: object): any;
export function createIndex(defaultRoot: object): React.ComponentClass<any>;
export interface ConnectorDescription {
displayName: string;
@@ -10,7 +10,7 @@ import {
() => {
const InstantSearch = createInstantSearch(() => ({}), {Root: 'div', props: {className: `widget`}});
<InstantSearch>
<InstantSearch appId={'test'} apiKey={'test'}>
<div></div>
</InstantSearch>;
};
@@ -18,7 +18,7 @@ import {
() => {
const Index = createIndex({Root: 'div', props: {className: `widget`}});
<Index>
<Index indexName={'test'} root={{Root: 'div', props: {className: `widget`}}}>
<div></div>
</Index>;
};