1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00
Files
Boostnote/browser/main/Detail/InfoButton.js
2017-07-08 13:16:02 +09:00

33 lines
792 B
JavaScript

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)