Skip to content

Commit

Permalink
fix FullscreenButton
Browse files Browse the repository at this point in the history
  • Loading branch information
vienai8d committed Jan 2, 2019
1 parent caa6c8d commit d0f5ec8
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions browser/main/Detail/FullscreenButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@ import styles from './FullscreenButton.styl'
import i18n from 'browser/lib/i18n'

const OSX = global.process.platform === 'darwin'
const hotkey = (OSX ? i18n.__('Command(⌘)') : i18n.__('Ctrl(^)')) + '+B'
const FullscreenButton = ({
onClick
}) => (
<button styleName='control-fullScreenButton' title={i18n.__('Fullscreen')} onMouseDown={(e) => onClick(e)}>
<img styleName='iconInfo' src='../resources/icon/icon-full.svg' />
<span lang={i18n.locale} styleName='tooltip'>{i18n.__('Fullscreen')}({hotkey})</span>
</button>
)
}) => {
const hotkey = (OSX ? i18n.__('Command(⌘)') : i18n.__('Ctrl(^)')) + '+B'
return (
<button styleName='control-fullScreenButton' title={i18n.__('Fullscreen')} onMouseDown={(e) => onClick(e)}>
<img styleName='iconInfo' src='../resources/icon/icon-full.svg' />
<span lang={i18n.locale} styleName='tooltip'>{i18n.__('Fullscreen')}({hotkey})</span>
</button>
)
}

FullscreenButton.propTypes = {
onClick: PropTypes.func.isRequired
Expand Down

0 comments on commit d0f5ec8

Please sign in to comment.