Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

My CSS is my react app isn't working as expected

I’m working in this code branch. It’s a simple contacts app written with React as a self-study exercise.

My current problem is that when I click my add contact button, the add contact form in my modal is not styled correctly.
I’m trying to style it to modal-content from ./css/addContactModal.module.css which is called within AddContactModal.js.
enter image description here
Can someone advise me where I’ve gone wrong with respect to changing the modal form’s CSS?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Class .modal-content:

The class is defined as .modal-content in the CSS styles, but in the React component, you’re using .styles.modalContent instead.

Make sure to align them so that the styles are correctly applied to the React component.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading