Change match hover design
This commit is contained in:
parent
7bbeee9e25
commit
0bbaaa4d3b
|
|
@ -75,17 +75,11 @@ class Match extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
isHovered: false,
|
|
||||||
modal: false
|
modal: false
|
||||||
};
|
};
|
||||||
this.handleHover = this.handleHover.bind(this);
|
|
||||||
this.toggleModal = this.toggleModal.bind(this);
|
this.toggleModal = this.toggleModal.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleHover() {
|
|
||||||
this.setState({isHovered: !this.state.isHovered});
|
|
||||||
}
|
|
||||||
|
|
||||||
toggleModal() {
|
toggleModal() {
|
||||||
this.setState({modal: !this.state.modal})
|
this.setState({modal: !this.state.modal})
|
||||||
}
|
}
|
||||||
|
|
@ -128,8 +122,7 @@ class Match extends React.Component {
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div className='mb-3'>
|
<div className='mb-3'>
|
||||||
<Card className={(this.state.isHovered ? 'shadow' : 'shadow-sm')} onMouseEnter={this.handleHover}
|
<Card className='shadow-sm match' onClick={this.toggleModal}>
|
||||||
onMouseLeave={this.handleHover} onClick={this.toggleModal}>
|
|
||||||
<CardBody className={'border py-2 ' + cardClass}>
|
<CardBody className={'border py-2 ' + cardClass}>
|
||||||
<MatchTable match={this.props.match}/>
|
<MatchTable match={this.props.match}/>
|
||||||
</CardBody>
|
</CardBody>
|
||||||
|
|
|
||||||
|
|
@ -12,4 +12,13 @@
|
||||||
|
|
||||||
.minw-25 {
|
.minw-25 {
|
||||||
min-width: 25%;
|
min-width: 25%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.match:hover {
|
||||||
|
box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.match:hover > div {
|
||||||
|
border-width: 3px !important;
|
||||||
|
margin: -2px;
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue