0

I have this button written in React

<div
                className="buildingblock-left-container"
                style={Object.assign(
                    { marginLeft: arrowMarginSize, alignSelf: "center" },
                    leftIsClickable ? styles.clickableButton : styles.notClickableButton
                )}
                onClick={updateCurrentProductContainer.bind(this, -1)}
            >
                <FontAwesomeIcon
                    icon={faChevronLeft}
                    size={arrowIconSize}
                    color={leftIsClickable ? "#b58db8" : "gray"}
                />
            </div>

It's a FontAwesomeIcon inside a div which has a onClick attribute. When I press on the button multiple times in a row, some elements around it can become blue, active.. Here's a picture to show what I mean

example

I hope you see what I mean, the image becomes blue and "selected"... This can also happen to text around the clickable div.. How do I prevent this from happening?

randomboiguyhere
  • 525
  • 5
  • 17

0 Answers0