Random Quote Machine - leave feedback please

Hi,

I want to share my Random Quote Machine:

I used React functional and class components.

One thing that kept me stuck was trying to color the left quote " that is behind the quote itself, I couldn’t. I don’t understand how to pass a color from the state of the main component to a pseudo element :before in a child component. So the left quote is in a light grey.

I would be pleased to receive your feedback.

I hope to learn about APIs as soon as possible to get better in this kind of projects, because I had to hard code API data to simulate the fetch quote “User Story”

I was able to get your background quote to change colors by removing the color property on .quote::before and then setting an opacity on it (assuming you want it to be the same color as everything else).

1 Like

@bbsmooth

Oh yeah, that worked, and you are right, that was what I wanted.

But, what about if there is the need to style a pseudo element in a child component with another color that is in the state of the parent component. ¿How to do that with React?