diff --git a/public/app/features/library-panels/components/LibraryPanelsSearch/LibraryPanelsSearch.tsx b/public/app/features/library-panels/components/LibraryPanelsSearch/LibraryPanelsSearch.tsx
index df197f2867d..302dc41d790 100644
--- a/public/app/features/library-panels/components/LibraryPanelsSearch/LibraryPanelsSearch.tsx
+++ b/public/app/features/library-panels/components/LibraryPanelsSearch/LibraryPanelsSearch.tsx
@@ -9,8 +9,14 @@ import { LibraryPanelsView } from '../LibraryPanelsView/LibraryPanelsView';
import { DEFAULT_PER_PAGE_PAGINATION } from '../../../../core/constants';
import { LibraryPanelDTO } from '../../types';
+export enum LibraryPanelsSearchVariant {
+ Tight = 'tight',
+ Spacious = 'spacious',
+}
+
export interface LibraryPanelsSearchProps {
onClick: (panel: LibraryPanelDTO) => void;
+ variant?: LibraryPanelsSearchVariant;
showSort?: boolean;
showFilter?: boolean;
showSecondaryActions?: boolean;
@@ -20,6 +26,7 @@ export interface LibraryPanelsSearchProps {
export const LibraryPanelsSearch = ({
onClick,
+ variant = LibraryPanelsSearchVariant.Spacious,
currentPanelId,
perPage = DEFAULT_PER_PAGE_PAGINATION,
showFilter = false,
@@ -33,14 +40,43 @@ export const LibraryPanelsSearch = ({
const onSortChange = useCallback((sort: SelectableValue
) => setSortDirection(sort.value), []);
const onFilterChange = useCallback((plugins: PanelPluginMeta[]) => setPanelFilter(plugins.map((p) => p.id)), []);
+ if (variant === LibraryPanelsSearchVariant.Spacious) {
+ return (
+
+
+
+
+ {showSort && }
+ {showFilter && }
+
+
+
+
+
+
+ );
+ }
+
return (
-
-
-
- {showSort && }
- {showFilter && }
-
+
+
+
+
+
+
+ {showSort &&
}
+ {showFilter &&
}
+
+