mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Explore: Use PageToolbar component & some cleanup (#41318)
* Explore: Use PageToolbar component & some cleanup * remove unneeded getStyles * remove unneeded fragment * restore cancelQueries action handler in reducer * avoid nested ternary operator * Clean up explore e2e
This commit is contained in:
@@ -12,7 +12,7 @@ import { getFocusStyles } from '../../themes/mixins';
|
||||
|
||||
export interface Props {
|
||||
pageIcon?: IconName;
|
||||
title: string;
|
||||
title?: string;
|
||||
parent?: string;
|
||||
onGoBack?: () => void;
|
||||
titleHref?: string;
|
||||
@@ -80,7 +80,8 @@ export const PageToolbar: FC<Props> = React.memo(
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
{titleHref && (
|
||||
|
||||
{title && titleHref && (
|
||||
<h1 className={styles.h1Styles}>
|
||||
<Link
|
||||
aria-label="Search dashboard by name"
|
||||
@@ -91,7 +92,7 @@ export const PageToolbar: FC<Props> = React.memo(
|
||||
</Link>
|
||||
</h1>
|
||||
)}
|
||||
{!titleHref && <h1 className={styles.titleText}>{title}</h1>}
|
||||
{title && !titleHref && <h1 className={styles.titleText}>{title}</h1>}
|
||||
</nav>
|
||||
{leftItems?.map((child, index) => (
|
||||
<div className={styles.leftActionItem} key={index}>
|
||||
|
||||
Reference in New Issue
Block a user