Skip to content

Commit 1ae28b0

Browse files
committed
revert legend toggle due to tab issues
1 parent 81669d4 commit 1ae28b0

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

src/legacy/ui/public/vis/vis_types/_vislib_vis_legend.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ $visLegendLineHeight: $euiSize;
1111
position: absolute;
1212
bottom: 0;
1313
left: 0;
14+
display: flex;
15+
padding: $euiSizeXS;
1416
background-color: $euiColorEmptyShade;
1517
transition: opacity $euiAnimSpeedFast $euiAnimSlightResistance,
1618
background-color $euiAnimSpeedFast $euiAnimSlightResistance $euiAnimSpeedExtraSlow;

src/legacy/ui/public/vis/vis_types/vislib_vis_legend/vislib_vis_legend.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import classNames from 'classnames';
2121
import { compact, uniq, map } from 'lodash';
2222

2323
import { i18n } from '@kbn/i18n';
24-
import { EuiPopoverProps, EuiButtonIcon, keyCodes, htmlIdGenerator } from '@elastic/eui';
24+
import { EuiPopoverProps, EuiIcon, keyCodes, htmlIdGenerator } from '@elastic/eui';
2525

2626
// @ts-ignore
2727
import { Data } from '../../../vislib/lib/data';
@@ -239,9 +239,8 @@ export class VisLegend extends PureComponent<VisLegendProps, VisLegendState> {
239239

240240
return (
241241
<div className="visLegend">
242-
<EuiButtonIcon
243-
color="text"
244-
iconType="list"
242+
<button
243+
type="button"
245244
onClick={this.toggleLegend}
246245
className={classNames('visLegend__toggle', {
247246
'visLegend__toggle--isOpen': open,
@@ -255,7 +254,9 @@ export class VisLegend extends PureComponent<VisLegendProps, VisLegendState> {
255254
title={i18n.translate('common.ui.vis.visTypes.legend.toggleLegendButtonTitle', {
256255
defaultMessage: 'Toggle legend',
257256
})}
258-
/>
257+
>
258+
<EuiIcon color="text" type="list" />
259+
</button>
259260
{open && this.renderLegend(anchorPosition)}
260261
</div>
261262
);

0 commit comments

Comments
 (0)