diff --git a/images/stop.svg b/images/stop.svg new file mode 100644 index 00000000..4ca0b398 --- /dev/null +++ b/images/stop.svg @@ -0,0 +1,20 @@ + + + + stop + Created with Sketch. + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/package.json b/package.json index 88b17c86..dc2122fb 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "express": "^4.13.4", "react": "^15.0.2", "react-dom": "^15.0.2", + "react-inlinesvg": "^0.4.2", "react-redux": "^4.4.5", "redux": "^3.5.2" } diff --git a/shared/components/Toolbar/Toolbar.jsx b/shared/components/Toolbar/Toolbar.jsx index c59d63c2..b6b5ff38 100644 --- a/shared/components/Toolbar/Toolbar.jsx +++ b/shared/components/Toolbar/Toolbar.jsx @@ -1,7 +1,9 @@ import React from 'react'; +var Isvg = require('react-inlinesvg'); var playUrl = require('../../../images/play.svg'); var logoUrl = require('../../../images/p5js-logo.svg'); +var stopUrl = require('../../../images/stop.svg'); class Toolbar extends React.Component { render() { @@ -9,8 +11,13 @@ class Toolbar extends React.Component {
- +
+ { this.props.isPlaying ? +
+ +
+ : null }
); } diff --git a/styles/abstracts/_placeholders.scss b/styles/abstracts/_placeholders.scss index 89c3c95f..13750426 100644 --- a/styles/abstracts/_placeholders.scss +++ b/styles/abstracts/_placeholders.scss @@ -9,4 +9,17 @@ line-height: #{50 / $base-font-size}rem; cursor: pointer; + + & g { + fill: $light-toolbar-button-color; + } + + &:hover { + background-color: $light-button-background-hover-color; + color: $light-button-hover-color; + + & g { + fill: $light-button-hover-color; + } + } } \ No newline at end of file diff --git a/styles/components/_toolbar.scss b/styles/components/_toolbar.scss index 0f7e7794..2503cda9 100644 --- a/styles/components/_toolbar.scss +++ b/styles/components/_toolbar.scss @@ -1,5 +1,10 @@ .toolbar__play-button { @extend %toolbar-button; + margin-right: #{15 / $base-font-size}rem; +} + +.toolbar__stop-button { + @extend %toolbar-button; } .toolbar__logo {