File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -6,15 +6,16 @@ import i18n from 'browser/lib/i18n'
6
6
7
7
const ToggleStackDirectionButton = ( {
8
8
onClick, isStacking
9
- } ) => (
10
- < button styleName = 'control-splitPanelDirection' onClick = { ( ) => onClick ( ! isStacking ) } >
11
- < img styleName = 'iconInfo' src = { isStacking ? '../resources/icon/icon-panel-split-vertical.svg' : '../resources/icon/icon-panel-split-horizontal.svg' } />
12
- < span lang = { i18n . locale } styleName = 'tooltip' > {
13
- isStacking ? i18n . __ ( 'Split Panels Horizontally' ) : i18n . __ ( 'Split Panels Vertically' )
14
-
15
- } </ span >
16
- </ button >
17
- )
9
+ } ) => {
10
+ const imgSrc = isStacking ? '../resources/icon/icon-panel-split-vertical.svg' : '../resources/icon/icon-panel-split-horizontal.svg'
11
+ const text = isStacking ? i18n . __ ( 'Split Panels Horizontally' ) : i18n . __ ( 'Split Panels Vertically' )
12
+ return (
13
+ < button styleName = 'control-splitPanelDirection' onClick = { ( ) => onClick ( ! isStacking ) } >
14
+ < img styleName = 'iconInfo' src = { imgSrc } />
15
+ < span lang = { i18n . locale } styleName = 'tooltip' > { text } </ span >
16
+ </ button >
17
+ )
18
+ }
18
19
19
20
ToggleStackDirectionButton . propTypes = {
20
21
onClick : PropTypes . func . isRequired ,
You can’t perform that action at this time.
0 commit comments