Skip to content
This repository has been archived by the owner on May 22, 2018. It is now read-only.

Commit

Permalink
syntaxhighlight
Browse files Browse the repository at this point in the history
  • Loading branch information
diminator committed May 4, 2017
1 parent 6fa158b commit 0ad0774
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
30 changes: 17 additions & 13 deletions examples/client/audio_lock/js/components/audio_lock.js
Expand Up @@ -8,7 +8,8 @@ import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup';

import * as driver from 'js-bigchaindb-quickstart';

import {API_PATH} from '../../../js/constants/application_constants';
import SyntaxHighlighter from 'react-syntax-highlighter';
import { json } from 'react-syntax-highlighter/dist/styles'

import AccountActions from '../../../js/react/actions/account_actions';
import BigchainDBConnection from '../../../js/react/components/bigchaindb_connection';
Expand Down Expand Up @@ -698,18 +699,21 @@ class TimeLine extends Component {
</h3>
<div className="timeline__description">
{ transactionList.length > 0 ?
<div>
<a onClick={this.handleOpenModal}>
{transactionList[0].id}
</a>
<ReactModal
isOpen={this.state.showModal}
className="modal__content"
overlayClassName="modal__overlay"
contentLabel="Minimal Modal Example">
<p>Modal text!</p>
<button onClick={this.handleCloseModal}>Close Modal</button>
</ReactModal>
<div>
<a onClick={this.handleOpenModal}>
{transactionList[0].id}
</a>
<ReactModal
isOpen={this.state.showModal}
className="modal__content"
overlayClassName="modal__overlay"
contentLabel="Minimal Modal Example">
<SyntaxHighlighter language='javascript' style={json}>
{JSON.stringify(transactionList[0], null, 2)}
</SyntaxHighlighter>
{/*<p>{JSON.stringify(transactionList[0])}</p>*/}
<button onClick={this.handleCloseModal}>Close Modal</button>
</ReactModal>
</div> : null
}
</div>
Expand Down
1 change: 1 addition & 0 deletions examples/client/package.json
Expand Up @@ -41,6 +41,7 @@
"react-modal": "^1.7.7",
"react-scroll": "^1.0.24",
"react-speech-recognition": "^1.0.1",
"react-syntax-highlighter": "^5.5.0",
"react-transition-group": "^1.1.2",
"tone": "^0.10.0"
},
Expand Down

0 comments on commit 0ad0774

Please sign in to comment.