|
9 | 9 |
|
10 | 10 | import React, { memo, useMemo } from 'react'; |
11 | 11 | import { i18n } from '@kbn/i18n'; |
12 | | -import { EuiButtonIcon, EuiToolTip, useEuiTheme } from '@elastic/eui'; |
| 12 | +import { EuiButtonIcon, useEuiTheme } from '@elastic/eui'; |
13 | 13 | import type { Position } from '@elastic/charts'; |
14 | 14 | import { css } from '@emotion/react'; |
15 | 15 |
|
@@ -51,30 +51,23 @@ const LegendToggleComponent = ({ onClick, showLegend, legendPosition }: LegendTo |
51 | 51 | ); |
52 | 52 |
|
53 | 53 | return ( |
54 | | - <EuiToolTip |
55 | | - content={i18n.translate('charts.legend.toggleLegendButtonTitle', { |
| 54 | + <EuiButtonIcon |
| 55 | + type="button" |
| 56 | + iconType="listBullet" |
| 57 | + color="text" |
| 58 | + onClick={onClick} |
| 59 | + css={[ |
| 60 | + baseStyles, |
| 61 | + showLegend ? isOpenStyle : null, |
| 62 | + ['left', 'bottom'].includes(legendPosition) ? positionStyle : null, |
| 63 | + ]} |
| 64 | + aria-label={i18n.translate('charts.legend.toggleLegendButtonAriaLabel', { |
56 | 65 | defaultMessage: 'Toggle legend', |
57 | 66 | })} |
58 | | - disableScreenReaderOutput |
59 | | - > |
60 | | - <EuiButtonIcon |
61 | | - type="button" |
62 | | - iconType="listBullet" |
63 | | - color="text" |
64 | | - onClick={onClick} |
65 | | - css={[ |
66 | | - baseStyles, |
67 | | - showLegend ? isOpenStyle : null, |
68 | | - ['left', 'bottom'].includes(legendPosition) ? positionStyle : null, |
69 | | - ]} |
70 | | - aria-label={i18n.translate('charts.legend.toggleLegendButtonAriaLabel', { |
71 | | - defaultMessage: 'Toggle legend', |
72 | | - })} |
73 | | - aria-expanded={showLegend} |
74 | | - isSelected={showLegend} |
75 | | - data-test-subj="vislibToggleLegend" |
76 | | - /> |
77 | | - </EuiToolTip> |
| 67 | + aria-expanded={showLegend} |
| 68 | + isSelected={showLegend} |
| 69 | + data-test-subj="vislibToggleLegend" |
| 70 | + /> |
78 | 71 | ); |
79 | 72 | }; |
80 | 73 |
|
|
0 commit comments