I'm building a Menu component in react that shows a list of options. Each option has a text on the left and the '>' icon on the right. But, when I hover on the parent I want the '>' symbol to change to '>>'. How can I do this? I have added the current state of the source. I just need to hide BsChevronRight on parent hover and show BsChevronDoubleRight and viceversa.
function Menu({data}:{data:IMenuItemData[]}) {
return (
<div className="w-2/12 flex flex-col absolute top-2/4">
{data.map(el => {
return <a href="#" className="flex row justify-between items-center group">
{el.text}
<BsChevronRight></BsChevronRight>
<BsChevronDoubleRight></BsChevronDoubleRight>
</a>
})}
</div>
)
}
I'm looking for a CSS only solution.