diff --git a/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx b/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx index e5e7a6d7501..0d9fbc1a559 100644 --- a/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx +++ b/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx @@ -279,11 +279,7 @@ export class PanelEditorUnconnected extends PureComponent { > {this.renderHorizontalSplit(styles)}
- + {this.renderFieldOptions()} {this.renderVisSettings()} @@ -403,6 +399,7 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => { position: relative; `, toolbarLeft: css` + padding-left: ${theme.spacing.sm}; display: flex; align-items: center; `, diff --git a/public/app/features/dashboard/components/PanelEditor/PanelTitle.tsx b/public/app/features/dashboard/components/PanelEditor/PanelTitle.tsx index 4e0b900bcee..03d6ca29a30 100644 --- a/public/app/features/dashboard/components/PanelEditor/PanelTitle.tsx +++ b/public/app/features/dashboard/components/PanelEditor/PanelTitle.tsx @@ -1,6 +1,7 @@ import React, { useState } from 'react'; import { css } from 'emotion'; -import { Forms, useTheme } from '@grafana/ui'; +import { Forms, useTheme, stylesFactory } from '@grafana/ui'; +import { GrafanaTheme } from '@grafana/data'; interface PanelTitleProps { value: string; @@ -10,26 +11,30 @@ interface PanelTitleProps { export const PanelTitle: React.FC = ({ value, onChange }) => { const [isEditing, setIsEditing] = useState(false); const theme = useTheme(); + const styles = getStyles(theme); + return ( - <> +
{isEditing ? ( elem && elem.focus()} onChange={e => onChange(e.currentTarget.value)} onBlur={() => setIsEditing(false)} placeholder="Panel Title" /> ) : ( - setIsEditing(true)} - > - {value} - + setIsEditing(true)}>{value} )} - +
); }; + +const getStyles = stylesFactory((theme: GrafanaTheme) => { + return { + wrapper: css` + font-size: ${theme.typography.size.lg}; + padding-left: ${theme.spacing.md}; + `, + }; +});