I'm facing an issue with a component that needs its width to change based on props.
The style for the component is as follows:
const SidebarContainer = styled.div`
width: ${props.isOpen ? 340 : 73}px;
height: 100vh;
background-color: ${colors.white100};
padding-left: 30px;
padding-top: 17px;
overflow: hidden;
position: fixed;
transition: all 0.5s ease;
`
Although I have specified a transition, the styles are changing abruptly without the transition effect. I attempted to use data attributes, but it didn't work as expected. How can I resolve this issue?