styled components

CREATED
2019 Dec 11th
UPDATED
2019 Dec 11th

conditionally use a style

<StyledButton
	active={true}
	onClick={this.handleButton}
></StyledButton>

And in your styles something like this:

const StyledButton = styled.button`
	align-items: center;
	line-height: 0.2;

	${({ active }) =>
		active &&
		`
    background: blue;
  `}
`;
>>> END OF CHEAT SHEET <<<

>> MADE BY <<

❤️ SCOTT SPENCE

© 2025 - ALL RIGHTS RESERVED

⚡ CHEAT SHEETS - DEV REFERENCES ⚡