diff --git a/package.json b/package.json index dc2122fb..fdd17705 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ }, "dependencies": { "babel-core": "^6.8.0", + "classnames": "^2.2.5", "codemirror": "^5.14.2", "express": "^4.13.4", "react": "^15.0.2", diff --git a/shared/components/Toolbar/Toolbar.jsx b/shared/components/Toolbar/Toolbar.jsx index b6b5ff38..6c6ca618 100644 --- a/shared/components/Toolbar/Toolbar.jsx +++ b/shared/components/Toolbar/Toolbar.jsx @@ -4,17 +4,23 @@ var Isvg = require('react-inlinesvg'); var playUrl = require('../../../images/play.svg'); var logoUrl = require('../../../images/p5js-logo.svg'); var stopUrl = require('../../../images/stop.svg'); +var classNames = require('classnames'); class Toolbar extends React.Component { render() { + let playButtonClass = classNames({ + "toolbar__play-button": true, + "playing": this.props.isPlaying + }); + return (