Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

Commit

Permalink
fix(docsearch): fix vanilla DocSearch types
Browse files Browse the repository at this point in the history
  • Loading branch information
francoischalifour committed Aug 7, 2020
1 parent b499fee commit 2b5e7aa
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/docsearch-js/src/docsearch.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { DocSearch, DocSearchProps, version } from '@docsearch/react';
import {
DocSearch,
DocSearchProps as DocSearchComponentProps,
version,
} from '@docsearch/react';
import React, { render } from 'preact/compat';

function getHTMLElement(
Expand All @@ -12,6 +16,11 @@ function getHTMLElement(
return value;
}

interface DocSearchProps extends DocSearchComponentProps {
container: string | HTMLElement;
environment?: typeof window;
}

export function docsearch(props: DocSearchProps) {
render(
<DocSearch
Expand Down

0 comments on commit 2b5e7aa

Please sign in to comment.