|
@@ -44,12 +44,6 @@ class Toolbar extends Component {
|
44
|
44
|
*/
|
45
|
45
|
className: React.PropTypes.string,
|
46
|
46
|
|
47
|
|
- /**
|
48
|
|
- * If the toolbar requires splitter this property defines splitter
|
49
|
|
- * index.
|
50
|
|
- */
|
51
|
|
- splitterIndex: React.PropTypes.number,
|
52
|
|
-
|
53
|
47
|
/**
|
54
|
48
|
* Map with toolbar buttons.
|
55
|
49
|
*/
|
|
@@ -105,12 +99,11 @@ class Toolbar extends Component {
|
105
|
99
|
* @param {Array} acc - Toolbar buttons array.
|
106
|
100
|
* @param {Array} keyValuePair - Key value pair containing button and its
|
107
|
101
|
* key.
|
108
|
|
- * @param {number} index - Index of the key value pair in the array.
|
109
|
102
|
* @private
|
110
|
|
- * @returns {Array} Array of toolbar buttons and splitter if it's on.
|
|
103
|
+ * @returns {Array} Array of toolbar buttons.
|
111
|
104
|
*/
|
112
|
|
- _renderToolbarButton(acc: Array<*>, keyValuePair: Array<*>,
|
113
|
|
- index: number): Array<ReactElement<*>> {
|
|
105
|
+ _renderToolbarButton(acc: Array<*>,
|
|
106
|
+ keyValuePair: Array<*>): Array<ReactElement<*>> {
|
114
|
107
|
const [ key, button ] = keyValuePair;
|
115
|
108
|
|
116
|
109
|
if (button.component) {
|
|
@@ -123,13 +116,7 @@ class Toolbar extends Component {
|
123
|
116
|
return acc;
|
124
|
117
|
}
|
125
|
118
|
|
126
|
|
- const { splitterIndex, tooltipPosition } = this.props;
|
127
|
|
-
|
128
|
|
- if (splitterIndex && index === splitterIndex) {
|
129
|
|
- const splitter = <span className = 'toolbar__splitter' />;
|
130
|
|
-
|
131
|
|
- acc.push(splitter);
|
132
|
|
- }
|
|
119
|
+ const { tooltipPosition } = this.props;
|
133
|
120
|
|
134
|
121
|
const { onClick, onMount, onUnmount } = button;
|
135
|
122
|
|