From f5af16d1f5f6b3e6b4256642efe6e3bf95df3466 Mon Sep 17 00:00:00 2001 From: Devin Starks Date: Mon, 17 Apr 2017 03:16:27 -0400 Subject: [PATCH] starts adding keyboard logo --- src/Main/Sidebar/Logo/index.jsx | 17 +++++++---------- src/Main/Toolbox/Keyboard/Keys/Key/index.jsx | 1 - .../Toolbox/Keyboard/Keys/Key/utils/keybind.js | 4 ++-- src/Main/Toolbox/Keyboard/Logo/images/logo.svg | 0 src/Main/Toolbox/Keyboard/Logo/index.jsx | 17 +++++++++++++++++ src/Main/Toolbox/Keyboard/Logo/styles.scss | 5 +++++ 6 files changed, 31 insertions(+), 13 deletions(-) create mode 100644 src/Main/Toolbox/Keyboard/Logo/images/logo.svg create mode 100644 src/Main/Toolbox/Keyboard/Logo/index.jsx create mode 100644 src/Main/Toolbox/Keyboard/Logo/styles.scss diff --git a/src/Main/Sidebar/Logo/index.jsx b/src/Main/Sidebar/Logo/index.jsx index c2b9499..c2801d2 100644 --- a/src/Main/Sidebar/Logo/index.jsx +++ b/src/Main/Sidebar/Logo/index.jsx @@ -1,19 +1,16 @@ -import React, { Component } from 'react'; +import React from 'react'; import CSSModules from 'react-css-modules'; import styles from './styles.scss'; import logo from "./images/logo.svg"; -class Logo extends Component { - render() { - - return ( -
-
-
- ); - } +function Logo() { + return ( +
+
+
+ ); } diff --git a/src/Main/Toolbox/Keyboard/Keys/Key/index.jsx b/src/Main/Toolbox/Keyboard/Keys/Key/index.jsx index 5e15cc9..4f1bd61 100644 --- a/src/Main/Toolbox/Keyboard/Keys/Key/index.jsx +++ b/src/Main/Toolbox/Keyboard/Keys/Key/index.jsx @@ -5,7 +5,6 @@ import keybind from './utils/keybind'; import _ from 'lodash'; - class Key extends Component { static propTypes = { synth: React.PropTypes.object.isRequired, diff --git a/src/Main/Toolbox/Keyboard/Keys/Key/utils/keybind.js b/src/Main/Toolbox/Keyboard/Keys/Key/utils/keybind.js index acee149..5cfff45 100644 --- a/src/Main/Toolbox/Keyboard/Keys/Key/utils/keybind.js +++ b/src/Main/Toolbox/Keyboard/Keys/Key/utils/keybind.js @@ -25,8 +25,8 @@ const keys = {}; function keybind(note, trigger, release) { const code = KEYMAP[note]; - document.addEventListener('keydown', () => onKeyDown(code, trigger)); - document.addEventListener('keyup', () => onKeyUp(code, release)); + document.addEventListener('keydown', e => onKeyDown(code, trigger, e)); + document.addEventListener('keyup', e => onKeyUp(code, release, e)); } function onKeyDown(code, cb, e) { diff --git a/src/Main/Toolbox/Keyboard/Logo/images/logo.svg b/src/Main/Toolbox/Keyboard/Logo/images/logo.svg new file mode 100644 index 0000000..e69de29 diff --git a/src/Main/Toolbox/Keyboard/Logo/index.jsx b/src/Main/Toolbox/Keyboard/Logo/index.jsx new file mode 100644 index 0000000..c2801d2 --- /dev/null +++ b/src/Main/Toolbox/Keyboard/Logo/index.jsx @@ -0,0 +1,17 @@ +import React from 'react'; +import CSSModules from 'react-css-modules'; +import styles from './styles.scss'; + + +import logo from "./images/logo.svg"; + +function Logo() { + return ( +
+
+
+ ); +} + + +export default CSSModules(Logo, styles); diff --git a/src/Main/Toolbox/Keyboard/Logo/styles.scss b/src/Main/Toolbox/Keyboard/Logo/styles.scss new file mode 100644 index 0000000..dd9fd5d --- /dev/null +++ b/src/Main/Toolbox/Keyboard/Logo/styles.scss @@ -0,0 +1,5 @@ +@import "./src/styles/base"; + +:local(.Logo) { + background-color: #fff; +}