mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Search: Make items more compact (#31734)
This commit is contained in:
parent
0b6b8de6f8
commit
ab2f405205
@ -5,7 +5,7 @@ import { TagList, Card, useStyles, Icon, IconName } from '@grafana/ui';
|
||||
import { GrafanaTheme } from '@grafana/data';
|
||||
import { DashboardSectionItem, OnToggleChecked } from '../types';
|
||||
import { SearchCheckbox } from './SearchCheckbox';
|
||||
import { SEARCH_ITEM_HEIGHT } from '../constants';
|
||||
import { SEARCH_ITEM_HEIGHT, SEARCH_ITEM_MARGIN } from '../constants';
|
||||
|
||||
export interface Props {
|
||||
item: DashboardSectionItem;
|
||||
@ -76,6 +76,7 @@ const getStyles = (theme: GrafanaTheme) => {
|
||||
return {
|
||||
container: css`
|
||||
padding: ${theme.spacing.sm} ${theme.spacing.md};
|
||||
margin-bottom: ${SEARCH_ITEM_MARGIN}px;
|
||||
`,
|
||||
metaContainer: css`
|
||||
display: flex;
|
||||
|
@ -1,7 +1,7 @@
|
||||
export const NO_ID_SECTIONS = ['Recent', 'Starred'];
|
||||
// Height of the search result item
|
||||
export const SEARCH_ITEM_HEIGHT = 62;
|
||||
export const SEARCH_ITEM_MARGIN = 8;
|
||||
export const SEARCH_ITEM_HEIGHT = 58;
|
||||
export const SEARCH_ITEM_MARGIN = 4;
|
||||
export const DEFAULT_SORT = { label: 'A\u2013Z', value: 'alpha-asc' };
|
||||
export const SECTION_STORAGE_KEY = 'search.sections';
|
||||
export const GENERAL_FOLDER_ID = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user