aboutsummaryrefslogtreecommitdiff
path: root/src/Toolkit.js
diff options
context:
space:
mode:
authorMartin Ashby <martin@ashbysoft.com>2018-05-18 10:17:33 +0000
committerMartin Ashby <martin@ashbysoft.com>2018-05-18 10:17:33 +0000
commitc2faad3ac834f622956787c87713ccf6ab9b61e0 (patch)
tree9a361455d455fdbb7adcb2cccb152f9291fd5bdd /src/Toolkit.js
parentdf173643648d24e49822abb3cd91f519e6161b7f (diff)
parentad570aa798fae952b9f996c8681270693fe4da38 (diff)
downloadunicornpaint-c2faad3ac834f622956787c87713ccf6ab9b61e0.tar.gz
unicornpaint-c2faad3ac834f622956787c87713ccf6ab9b61e0.tar.bz2
unicornpaint-c2faad3ac834f622956787c87713ccf6ab9b61e0.tar.xz
unicornpaint-c2faad3ac834f622956787c87713ccf6ab9b61e0.zip
Merge branch 'master' of github.com:MFAshby/unicornpaint
Diffstat (limited to 'src/Toolkit.js')
-rw-r--r--src/Toolkit.js20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/Toolkit.js b/src/Toolkit.js
index 35d8759..b12f418 100644
--- a/src/Toolkit.js
+++ b/src/Toolkit.js
@@ -4,11 +4,11 @@ import './fontawesome-all.min.js'
class ToolKitItem extends Component {
render() {
let iconClass = this.props.tool.icon + " fa-2x"
- var divClass = "toolkititem"
+ let style = styles.toolkititem
if (this.props.selected) {
- divClass += " selected"
+ style = Object.assign({}, style, styles.selected)
}
- return <div className={divClass}
+ return <div style={style}
onClick={() => this.props.onSelectTool(this.props.tool)}>
<i className={iconClass}></i>
</div>
@@ -24,8 +24,20 @@ export default class Toolkit extends Component {
selected={tool === this.props.selectedTool}
onSelectTool={this.props.onSelectTool}/>
})
- return <div className="toolkit">
+ return <div style={styles.toolkit}>
{toolComponents}
</div>
}
}
+
+const styles = {
+ toolkit: {
+ background: "grey"
+ },
+ toolkititem: {
+ padding: "5px",
+ },
+ selected: {
+ background: "lightcoral"
+ }
+} \ No newline at end of file