diff --git a/plugins/search/api-report.md b/plugins/search/api-report.md index 4141465766..151b160367 100644 --- a/plugins/search/api-report.md +++ b/plugins/search/api-report.md @@ -217,10 +217,13 @@ export const SearchType: ({ // @public (undocumented) export const SidebarSearch: (props: SidebarSearchProps) => JSX.Element; +// Warning: (ae-forgotten-export) The symbol "SidebarSearchModalProps" needs to be exported by the entry point index.d.ts // Warning: (ae-missing-release-tag) "SidebarSearchModal" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export const SidebarSearchModal: () => JSX.Element; +export const SidebarSearchModal: ( + props: SidebarSearchModalProps, +) => JSX.Element; // Warning: (ae-forgotten-export) The symbol "SearchContextValue" needs to be exported by the entry point index.d.ts // Warning: (ae-missing-release-tag) "useSearch" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) diff --git a/plugins/search/src/components/SidebarSearchModal/SidebarSearchModal.tsx b/plugins/search/src/components/SidebarSearchModal/SidebarSearchModal.tsx index ae38526c9d..b8f20de67d 100644 --- a/plugins/search/src/components/SidebarSearchModal/SidebarSearchModal.tsx +++ b/plugins/search/src/components/SidebarSearchModal/SidebarSearchModal.tsx @@ -16,17 +16,23 @@ import React from 'react'; import SearchIcon from '@material-ui/icons/Search'; import { SidebarItem } from '@backstage/core-components'; +import { IconComponent } from '@backstage/core-plugin-api'; import { SearchModal } from '../SearchModal'; import { useSearch } from '../SearchContext'; -export const SidebarSearchModal = () => { +export type SidebarSearchModalProps = { + icon?: IconComponent; +}; + +export const SidebarSearchModal = (props: SidebarSearchModalProps) => { const { open, toggleModal } = useSearch(); + const Icon = props.icon ? props.icon : SearchIcon; return ( <>