diff --git a/client/assets/styles/vbox.less b/client/assets/styles/vbox.less
index 7cbb9073..42c6999b 100644
--- a/client/assets/styles/vbox.less
+++ b/client/assets/styles/vbox.less
@@ -71,27 +71,34 @@
button {
height: 3em;
margin: 0;
- }
- button.empty {
- border-style: dashed;
+ &.empty {
+ border-style: dashed;
+ }
+
+ &.highlight {
+ color: black;
+ background: @white;
+ border: 1px solid @white;
+ }
}
svg {
stroke: none;
margin: 0 auto;
display: block;
+
+ &.red {
+ fill: @red;
+ }
+
+ &.green {
+ fill: @green;
+ }
+
+ &.blue {
+ fill: @blue;
+ }
}
- svg.red {
- fill: @red;
- }
-
- svg.green {
- fill: @green;
- }
-
- .blue {
- fill: @blue;
- }
}
diff --git a/client/src/components/vbox.component.jsx b/client/src/components/vbox.component.jsx
index af2664dd..3f8b9fa4 100644
--- a/client/src/components/vbox.component.jsx
+++ b/client/src/components/vbox.component.jsx
@@ -1,5 +1,6 @@
const preact = require('preact');
const range = require('lodash/range');
+const without = require('lodash/without');
const { connect } = require('preact-redux');
const shapes = require('./shapes');
@@ -142,7 +143,7 @@ function Vbox(args) {
return true;
}
- function boundBtn(v, group, index) {
+ function availableBtn(v, group, index) {
if (!v) return ;
function onClick() {
@@ -158,11 +159,21 @@ function Vbox(args) {
if (['Red', 'Green', 'Blue'].includes(v)) {
return (
-
+
);
}
- return ;
+ return (
+
+ );
}
@@ -176,11 +187,11 @@ function Vbox(args) {
hoverInfo(e, 'bits')} >{vbox.bits}b
- {range(0, 6).map(i => boundBtn(vbox.free[0][i], 0, i))}
+ {range(0, 6).map(i => availableBtn(vbox.free[0][i], 0, i))}
- {range(0, 3).map(i => boundBtn(vbox.free[1][i], 1, i))}
- {range(0, 3).map(i => boundBtn(vbox.free[2][i], 2, i))}
+ {range(0, 3).map(i => availableBtn(vbox.free[1][i], 1, i))}
+ {range(0, 3).map(i => availableBtn(vbox.free[2][i], 2, i))}