Skip to content
/ kibana Public
forked from elastic/kibana

Commit

Permalink
fix Lens heading structure (elastic#81752) (elastic#82112)
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 authored Oct 30, 2020
1 parent d168d37 commit ed03cb5
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
EuiPageContentHeader,
EuiFlexGroup,
EuiFlexItem,
EuiScreenReaderOnly,
} from '@elastic/eui';
import { Datasource, FramePublicAPI, Visualization } from '../../../types';
import { NativeRenderer } from '../../../native_renderer';
Expand Down Expand Up @@ -104,18 +105,25 @@ export function WorkspacePanelWrapper({
</EuiFlexGroup>
</div>
<EuiPageContent className="lnsWorkspacePanelWrapper">
{(!emptyExpression || title) && (
{!emptyExpression || title ? (
<EuiPageContentHeader
className={classNames('lnsWorkspacePanelWrapper__pageContentHeader', {
// eslint-disable-next-line @typescript-eslint/naming-convention
'lnsWorkspacePanelWrapper__pageContentHeader--unsaved': !title,
})}
>
<span data-test-subj="lns_ChartTitle">
<h1 data-test-subj="lns_ChartTitle">
{title ||
i18n.translate('xpack.lens.chartTitle.unsaved', { defaultMessage: 'Unsaved' })}
</span>
</h1>
</EuiPageContentHeader>
) : (
<EuiScreenReaderOnly>
<h1 data-test-subj="lns_ChartTitle">
{title ||
i18n.translate('xpack.lens.chartTitle.unsaved', { defaultMessage: 'Unsaved' })}
</h1>
</EuiScreenReaderOnly>
)}
<EuiPageContentBody className="lnsWorkspacePanelWrapper__pageContentBody">
{children}
Expand Down

0 comments on commit ed03cb5

Please sign in to comment.