How can I use conditional rendering in styled-components to set my button class to active using styled-components in React?
In css I would do it similarly to this:<
You can simply do this
And in your styles something like this:
const Tab = styled.button` width: 100%; outline: 0; border: 0; height: 100%; justify-content: center; align-items: center; line-height: 0.2; ${({ active }) => active && ` background: blue; `} `;