Skip to content

Commit 1c8af47

Browse files
committed
Fix warnings in ToggleModeButton
1 parent c8a2bac commit 1c8af47

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

browser/main/Detail/ToggleModeButton.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ const ToggleModeButton = ({
88
onClick, editorType
99
}) => (
1010
<div styleName='control-toggleModeButton'>
11-
<div styleName={editorType === 'SPLIT' ? 'active' : 'non-active'} onClick={() => onClick('SPLIT')}>
12-
<img styleName='item-star' src={editorType === 'EDITOR_PREVIEW' ? '../resources/icon/icon-mode-markdown-off-active.svg' : ''} />
11+
<div styleName={editorType === 'SPLIT' ? 'active' : undefined} onClick={() => onClick('SPLIT')}>
12+
<img src={editorType === 'EDITOR_PREVIEW' ? '../resources/icon/icon-mode-markdown-off-active.svg' : ''} />
1313
</div>
14-
<div styleName={editorType === 'EDITOR_PREVIEW' ? 'active' : 'non-active'} onClick={() => onClick('EDITOR_PREVIEW')}>
15-
<img styleName='item-star' src={editorType === 'EDITOR_PREVIEW' ? '' : '../resources/icon/icon-mode-split-on-active.svg'} />
14+
<div styleName={editorType === 'EDITOR_PREVIEW' ? 'active' : undefined} onClick={() => onClick('EDITOR_PREVIEW')}>
15+
<img src={editorType === 'EDITOR_PREVIEW' ? '' : '../resources/icon/icon-mode-split-on-active.svg'} />
1616
</div>
1717
<span lang={i18n.locale} styleName='tooltip'>{i18n.__('Toggle Mode')}</span>
1818
</div>
1919
)
2020

2121
ToggleModeButton.propTypes = {
2222
onClick: PropTypes.func.isRequired,
23-
editorType: PropTypes.string.Required
23+
editorType: PropTypes.string
2424
}
2525

2626
export default CSSModules(ToggleModeButton, styles)

0 commit comments

Comments
 (0)