diff --git a/plugins/techdocs/src/reader/components/TechDocsSearch.test.tsx b/plugins/techdocs/src/search/components/TechDocsSearch.test.tsx
similarity index 99%
rename from plugins/techdocs/src/reader/components/TechDocsSearch.test.tsx
rename to plugins/techdocs/src/search/components/TechDocsSearch.test.tsx
index b4233734aa..06d5ac6aac 100644
--- a/plugins/techdocs/src/reader/components/TechDocsSearch.test.tsx
+++ b/plugins/techdocs/src/search/components/TechDocsSearch.test.tsx
@@ -48,7 +48,7 @@ const singleResult = Promise.resolve({
],
});
-describe('', () => {
+describe('', () => {
it('should render techdocs search bar', async () => {
const query = () => emptyResults;
const querySpy = jest.fn(query);
diff --git a/plugins/techdocs/src/reader/components/TechDocsSearch.tsx b/plugins/techdocs/src/search/components/TechDocsSearch.tsx
similarity index 92%
rename from plugins/techdocs/src/reader/components/TechDocsSearch.tsx
rename to plugins/techdocs/src/search/components/TechDocsSearch.tsx
index 6c0be16f4f..74e2ac554e 100644
--- a/plugins/techdocs/src/reader/components/TechDocsSearch.tsx
+++ b/plugins/techdocs/src/search/components/TechDocsSearch.tsx
@@ -28,7 +28,7 @@ import Autocomplete from '@material-ui/lab/Autocomplete';
import React, { ChangeEvent, useEffect, useState } from 'react';
import { useNavigate } from 'react-router';
import useDebounce from 'react-use/lib/useDebounce';
-import { DocsResultListItem } from '../../components/DocsResultListItem';
+import { TechDocsSearchResultListItem } from '../../search';
const useStyles = makeStyles({
root: {
@@ -36,7 +36,12 @@ const useStyles = makeStyles({
},
});
-type TechDocsSearchProps = {
+/**
+ * Props for {@link TechDocsSearch}
+ *
+ * @public
+ */
+export type TechDocsSearchProps = {
entityId: EntityName;
debounceTime?: number;
};
@@ -55,10 +60,8 @@ type TechDocsSearchResult = {
document: TechDocsDoc;
};
-const TechDocsSearchBar = ({
- entityId,
- debounceTime = 150,
-}: TechDocsSearchProps) => {
+const TechDocsSearchBar = (props: TechDocsSearchProps) => {
+ const { entityId, debounceTime = 150 } = props;
const [open, setOpen] = useState(false);
const navigate = useNavigate();
const {
@@ -138,7 +141,7 @@ const TechDocsSearchBar = ({
value={null}
options={options}
renderOption={({ document }) => (
- {
const initialState = {
term: '',