1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-15 18:56:22 +00:00

Enable to appear a tooltip for the LockButton

This commit is contained in:
asmsuechan
2017-03-18 00:54:46 -07:00
parent 6aa9104076
commit f3ed22dd51
3 changed files with 43 additions and 2 deletions

View File

@@ -276,11 +276,14 @@ class MarkdownNoteDetail extends React.Component {
{(() => {
const faClassName=`fa ${this.getToggleLockButton()}`
const lockButtonComponent =
<button styleName='info-right-button'
<button styleName='control-lockButton'
onFocus={(e) => this.handleFocus(e)}
onMouseDown={(e) => this.handleLockButtonMouseDown(e)}
>
<i className={faClassName}/>
<span styleName='control-lockButton-tooltip'>
{this.state.isLocked ? 'Unlock' : 'Lock'}
</span>
</button>
return (
this.state.isLockButtonShown ? lockButtonComponent : ''