You can now select cards
Signed-off-by: James Ketrenos <james_eikona@ketrenos.com>
This commit is contained in:
parent
e116f6a33a
commit
9711c72646
@ -125,7 +125,7 @@
|
|||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Selected {
|
.Board .Selected {
|
||||||
background-color: rgba(0, 0, 0, 1);
|
background-color: rgba(0, 0, 0, 1);
|
||||||
box-shadow: 5px 5px 5px black;
|
box-shadow: 5px 5px 5px black;
|
||||||
}
|
}
|
||||||
|
@ -132,6 +132,11 @@
|
|||||||
filter: brightness(150%);
|
filter: brightness(150%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.Resource.Selected {
|
||||||
|
filter: brightness(150%);
|
||||||
|
top: -1em;
|
||||||
|
}
|
||||||
|
|
||||||
.Dice {
|
.Dice {
|
||||||
width: 1rem;
|
width: 1rem;
|
||||||
height: 1rem;
|
height: 1rem;
|
||||||
|
@ -125,23 +125,25 @@ class Development extends React.Component {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class Resource extends React.Component {
|
const Resource = ({ type, count }) => {
|
||||||
render() {
|
const array = new Array(Number(count ? count : 0));
|
||||||
const array = new Array(Number(this.props.count ? this.props.count : 0));
|
const select = (event) => {
|
||||||
|
event.target.classList.toggle('Selected');
|
||||||
|
};
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{ array.length > 0 &&
|
{ array.length > 0 &&
|
||||||
<div className="Stack">
|
<div className="Stack">
|
||||||
{ React.Children.map(array, i => (
|
{ React.Children.map(array, i => (
|
||||||
<div className="Resource"
|
<div className="Resource"
|
||||||
style={{backgroundImage:`url(${assetsPath}/gfx/card-${this.props.type}.png)`}}>
|
onClick={select}
|
||||||
|
style={{backgroundImage:`url(${assetsPath}/gfx/card-${type}.png)`}}>
|
||||||
</div>
|
</div>
|
||||||
)) }
|
)) }
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const Chat = ({ table }) => {
|
const Chat = ({ table }) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user