mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* ManageDashboards: Fixes and improvements * Fixed tests * Fixed issue with item height and margin
24 lines
622 B
TypeScript
24 lines
622 B
TypeScript
import React, { ButtonHTMLAttributes } from 'react';
|
|
import { IconButton } from '@grafana/ui';
|
|
import { e2e } from '@grafana/e2e';
|
|
|
|
export interface Props extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
surface: 'dashboard' | 'panel' | 'header';
|
|
}
|
|
|
|
export const BackButton: React.FC<Props> = ({ surface, onClick }) => {
|
|
return (
|
|
<IconButton
|
|
name="arrow-left"
|
|
tooltip="Go back (Esc)"
|
|
tooltipPlacement="bottom"
|
|
size="xxl"
|
|
surface={surface}
|
|
aria-label={e2e.components.BackButton.selectors.backArrow}
|
|
onClick={onClick}
|
|
/>
|
|
);
|
|
};
|
|
|
|
BackButton.displayName = 'BackButton';
|