mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-15 10:46:32 +00:00
Add infomation panel
This commit is contained in:
32
browser/main/Detail/InfoButton.js
Normal file
32
browser/main/Detail/InfoButton.js
Normal file
@@ -0,0 +1,32 @@
|
||||
import React, { PropTypes } from 'react'
|
||||
import CSSModules from 'browser/lib/CSSModules'
|
||||
import styles from './InfoButton.styl'
|
||||
|
||||
class InfoButton extends React.Component {
|
||||
constructor (props) {
|
||||
super(props)
|
||||
|
||||
this.handleInfoButtonClick = this.handleInfoButtonClick.bind(this)
|
||||
}
|
||||
|
||||
handleInfoButtonClick (e) {
|
||||
e.preventDefault()
|
||||
const infoPanel= document.querySelector('.infoPanel')
|
||||
infoPanel.style.display = display === 'none' ? 'inline' : 'none'
|
||||
}
|
||||
|
||||
render () {
|
||||
return (
|
||||
<button styleName='control-infoButton'
|
||||
onClick={(e) => this.handleInfoButtonClick(e)}
|
||||
>
|
||||
<i className='fa fa-info-circle infoButton' styleName='info-button' />
|
||||
</button>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
InfoButton.propTypes = {
|
||||
}
|
||||
|
||||
export default CSSModules(InfoButton, styles)
|
||||
Reference in New Issue
Block a user