Animation for chevron turning
This commit is contained in:
parent
49a2a27e4c
commit
e23c73594a
|
|
@ -37,9 +37,16 @@ export default class GroupStage extends Component {
|
|||
}
|
||||
|
||||
function ShowMatchesToggleChevron(props) {
|
||||
return (<Button color='link' onClick={props.toggle} className="position-absolute top-0 end-0 m-2">
|
||||
{props.show ? <FaChevronUp /> : <FaChevronDown />}
|
||||
</Button>);
|
||||
const toggleClass = props.show ? 'rotate' : '';
|
||||
return (
|
||||
<Button
|
||||
color='link'
|
||||
onClick={props.toggle}
|
||||
className='position-absolute top-0 end-0 m-2'
|
||||
>
|
||||
<FaChevronDown className={`my-chevron ${toggleClass}`} />
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
|
||||
export class Group extends Component {
|
||||
|
|
|
|||
|
|
@ -56,3 +56,10 @@
|
|||
.favorite-bar.visible {
|
||||
max-height: none;
|
||||
}
|
||||
|
||||
.my-chevron {
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
.my-chevron.rotate {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue