fix(docsearch): fix vanilla DocSearch types
This commit is contained in:
parent
2025a1b9a4
commit
5ccaead2d2
1 changed files with 10 additions and 1 deletions
|
|
@ -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(
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue