Animation for chevron turning

This commit is contained in:
Daniel Schädler 2025-03-17 15:31:23 +01:00
parent 49a2a27e4c
commit e23c73594a
2 changed files with 17 additions and 3 deletions

View File

@ -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 {

View File

@ -56,3 +56,10 @@
.favorite-bar.visible {
max-height: none;
}
.my-chevron {
transition: transform 0.3s ease;
}
.my-chevron.rotate {
transform: rotate(180deg);
}