• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: How to change a component’s color with styled-components?

Resolved: How to change a component’s color with styled-components?

0
By Isaac Tonny on 16/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I want to change a component Area‘s background color when move link hover on it.
Area is a self-created component. There is some errors if use it in the styled.div:
If use this way
There happens nothing on the page. How to haddle <Area backgroundColor="blue"> and change color for it?

Answer:

Without seeing more of the code for the other components, this may not work for you. One approach you could take is styling a Link for your YellowLink component where you define the styles of that link.
For example:

If you have better answer, please add a comment about this, thank you!

reactjs styled-components
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Table data is coming as empty in React

02/04/2023

Resolved: In a Pinescript v5 Strategy why is my bool not working?

02/04/2023

Resolved: net::ERR_HTTP2_PROTOCOL_ERROR by http get request angular 15.2

02/04/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.