1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 02:06:29 +00:00
This commit is contained in:
asmsuechan
2017-07-08 14:02:03 +09:00
parent 21f96febdb
commit f005bb1e46
3 changed files with 7 additions and 4 deletions

View File

@@ -6,13 +6,14 @@ const InfoButton = ({
onClick onClick
}) => ( }) => (
<button styleName='control-infoButton' <button styleName='control-infoButton'
onClick={(e) => onClick(e)} onClick={onClick}
> >
<i className='fa fa-info-circle infoButton' styleName='info-button' /> <i className='fa fa-info-circle infoButton' styleName='info-button' />
</button> </button>
) )
InfoButton.propTypes = { InfoButton.propTypes = {
onClick: PropTypes.func.isRequired
} }
export default CSSModules(InfoButton, styles) export default CSSModules(InfoButton, styles)

View File

@@ -54,7 +54,9 @@ const InfoPanel = ({
InfoPanel.propTypes = { InfoPanel.propTypes = {
storageName: PropTypes.string.isRequired, storageName: PropTypes.string.isRequired,
folderName: PropTypes.string.isRequired, folderName: PropTypes.string.isRequired,
noteKey: PropTypes.string.isRequired noteKey: PropTypes.string.isRequired,
updatedAt: PropTypes.string.isRequired,
createdAt: PropTypes.string.isRequired
} }
export default CSSModules(InfoPanel, styles) export default CSSModules(InfoPanel, styles)

View File

@@ -234,7 +234,7 @@ class MarkdownNoteDetail extends React.Component {
handleInfoButtonClick (e) { handleInfoButtonClick (e) {
const infoPanel = document.querySelector('.infoPanel') const infoPanel = document.querySelector('.infoPanel')
infoPanel.style.display = display === 'none' ? 'inline' : 'none' if (infoPanel.style) infoPanel.style.display = infoPanel.style.display === 'none' ? 'inline' : 'none'
} }
render () { render () {
@@ -309,7 +309,7 @@ class MarkdownNoteDetail extends React.Component {
<i className='fa fa-arrows-alt' styleName='fullScreen-button' /> <i className='fa fa-arrows-alt' styleName='fullScreen-button' />
</button> </button>
<InfoButton <InfoButton
onClick={this.handleInfoButtonClick()} onClick={(e) => this.handleInfoButtonClick(e)}
/> />
<InfoPanel <InfoPanel
storageName={currentOption.storage.name} storageName={currentOption.storage.name}