mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
Make InfoButton component stateless
This commit is contained in:
@@ -232,6 +232,11 @@ class MarkdownNoteDetail extends React.Component {
|
||||
this.focus()
|
||||
}
|
||||
|
||||
handleInfoButtonClick (e) {
|
||||
const infoPanel= document.querySelector('.infoPanel')
|
||||
infoPanel.style.display = display === 'none' ? 'inline' : 'none'
|
||||
}
|
||||
|
||||
render () {
|
||||
let { data, config, location } = this.props
|
||||
let { note } = this.state
|
||||
@@ -303,7 +308,9 @@ class MarkdownNoteDetail extends React.Component {
|
||||
>
|
||||
<i className='fa fa-arrows-alt' styleName='fullScreen-button' />
|
||||
</button>
|
||||
<InfoButton />
|
||||
<InfoButton
|
||||
onClick={this.handleInfoButtonClick()}
|
||||
/>
|
||||
<InfoPanel
|
||||
storageName={currentOption.storage.name}
|
||||
folderName={currentOption.folder.name}
|
||||
|
||||
Reference in New Issue
Block a user