|
@@ -10,9 +10,6 @@ import type { Props } from './AbstractToolboxItem';
|
10
|
10
|
* Web implementation of {@code AbstractToolboxItem}.
|
11
|
11
|
*/
|
12
|
12
|
export default class ToolboxItem extends AbstractToolboxItem<Props> {
|
13
|
|
- _label: string;
|
14
|
|
- _tooltip: string;
|
15
|
|
-
|
16
|
13
|
/**
|
17
|
14
|
* Handles rendering of the actual item. If the label is being shown, which
|
18
|
15
|
* is controlled with the `showLabel` prop, the item is rendered for its
|
|
@@ -40,7 +37,7 @@ export default class ToolboxItem extends AbstractToolboxItem<Props> {
|
40
|
37
|
// $FlowFixMe
|
41
|
38
|
<React.Fragment>
|
42
|
39
|
{ this._renderIcon() }
|
43
|
|
- { showLabel && this._label }
|
|
40
|
+ { showLabel && this.label }
|
44
|
41
|
</React.Fragment>
|
45
|
42
|
);
|
46
|
43
|
|
|
@@ -61,7 +58,7 @@ export default class ToolboxItem extends AbstractToolboxItem<Props> {
|
61
|
58
|
= showLabel ? 'overflow-menu-item-icon' : 'toolbox-icon';
|
62
|
59
|
const iconWrapper
|
63
|
60
|
= React.createElement(elementType, { className }, icon);
|
64
|
|
- const tooltip = this._tooltip;
|
|
61
|
+ const tooltip = this.tooltip;
|
65
|
62
|
const useTooltip = !showLabel && tooltip && tooltip.length > 0;
|
66
|
63
|
|
67
|
64
|
if (useTooltip) {
|