support custom list item props on search extensions
Co-authored-by: Camila Belo <camilaibs@gmail.com> Signed-off-by: Emma Indal <emma.indahl@gmail.com>
This commit is contained in:
@@ -19,6 +19,7 @@ import { IndexableDocument } from '@backstage/plugin-search-common';
|
||||
import { ReactNode } from 'react';
|
||||
import { ResultHighlight } from '@backstage/plugin-search-common';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { SearchResultListItemExtensionProps } from '@backstage/plugin-search-react';
|
||||
import { TabProps } from '@material-ui/core';
|
||||
|
||||
// @public @deprecated (undocumented)
|
||||
@@ -126,7 +127,7 @@ export const ToolExplorerContent: (props: {
|
||||
|
||||
// @public (undocumented)
|
||||
export const ToolSearchResultListItem: (
|
||||
props: ToolSearchResultListItemProps,
|
||||
props: SearchResultListItemExtensionProps<ToolSearchResultListItemProps>,
|
||||
) => JSX.Element | null;
|
||||
|
||||
// @public
|
||||
|
||||
@@ -22,7 +22,10 @@ import {
|
||||
discoveryApiRef,
|
||||
fetchApiRef,
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { createSearchResultListItemExtension } from '@backstage/plugin-search-react';
|
||||
import {
|
||||
createSearchResultListItemExtension,
|
||||
SearchResultListItemExtensionProps,
|
||||
} from '@backstage/plugin-search-react';
|
||||
import { ExploreClient, exploreApiRef } from './api';
|
||||
import { ToolSearchResultListItemProps } from './components/ToolSearchResultListItem';
|
||||
// import { exampleTools } from './util/examples';
|
||||
@@ -70,7 +73,7 @@ export const explorePlugin = createPlugin({
|
||||
|
||||
/** @public */
|
||||
export const ToolSearchResultListItem: (
|
||||
props: ToolSearchResultListItemProps,
|
||||
props: SearchResultListItemExtensionProps<ToolSearchResultListItemProps>,
|
||||
) => JSX.Element | null = explorePlugin.provide(
|
||||
createSearchResultListItemExtension({
|
||||
name: 'ToolSearchResultListItem',
|
||||
|
||||
Reference in New Issue
Block a user