Challenge: Adding a Button and Styling it with Emotion
Explore how to add a button to your React homepage and style it using CSS modules with specified colors and font sizes. Then, learn to convert this button into a reusable styled component using Emotion, enabling consistent design reuse across your application.
Overview
This challenge is divided into two parts, in first task you will add a button named “Add a comment” to the HomePage component and style it using CSS modules. In second task you have to create a reusable Addacommentbutton styled component with emotion so it can be used on multiple places. This will test your ability to apply styles to a React component using Emotion and build upon the topics covered in the chapter.
Requirements for creating a new button
You have been given a React code file for the HomePage component. Your task is to add a button ...