mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 16:15:42 -06:00
* PlaylistPage: removes search due to no wildcard support * PlaylistPage: adds back search input and wildcard search support * makes banner to appear only when playlist does not exist * Chore: small refactor * Chore: some code refactoring to make it readable * fixes focus leaving input when query is cleared * adds styling to the emptyQueryList banner * extracts emptyQueryListBanner component to a separate file * adds debounce to search * use new theme for styling * Chore: some nit fix * fixes empty list banner showing for a second before the full list is loaded * Fix: removes search when playlist is empty Co-authored-by: Ash <ashharrison90@gmail.com> Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
21 lines
551 B
TypeScript
21 lines
551 B
TypeScript
import React from 'react';
|
|
import { useStyles2 } from '@grafana/ui';
|
|
import { GrafanaTheme2 } from '@grafana/data';
|
|
import { css } from '@emotion/css';
|
|
|
|
export const EmptyQueryListBanner = () => {
|
|
const styles = useStyles2(getStyles);
|
|
return <div className={styles.noResult}>No playlist found!</div>;
|
|
};
|
|
|
|
const getStyles = (theme: GrafanaTheme2) => {
|
|
return {
|
|
noResult: css`
|
|
padding: ${theme.spacing(2)};
|
|
background: ${theme.colors.secondary.main};
|
|
font-style: italic;
|
|
margin-top: ${theme.spacing(2)};
|
|
`,
|
|
};
|
|
};
|