export SearchContext to be able to use in storybook as SearchContextProvider requires searchApiRef
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
This commit is contained in:
@@ -45,7 +45,9 @@ type SettableSearchContext = Omit<
|
||||
'result' | 'setTerm' | 'setTypes' | 'setFilters' | 'setPageCursor'
|
||||
>;
|
||||
|
||||
const SearchContext = createContext<SearchContextValue | undefined>(undefined);
|
||||
export const SearchContext = createContext<SearchContextValue | undefined>(
|
||||
undefined,
|
||||
);
|
||||
|
||||
export const SearchContextProvider = ({
|
||||
initialState = {
|
||||
|
||||
@@ -14,4 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export { SearchContextProvider, useSearch } from './SearchContext';
|
||||
export {
|
||||
SearchContextProvider,
|
||||
SearchContext,
|
||||
useSearch,
|
||||
} from './SearchContext';
|
||||
|
||||
Reference in New Issue
Block a user