Challenge: Use CSS Modules in React
Task: Building a User Card with CSS Modules
In this task, you'll design a user card displaying the user's photo and relevant information. Apply appropriate styles to each component and ensure their proper utilization. Our goal is to achieve such UI:
The task is:
In the
UserInfo.jsx
file, import the styles file (UserInfo.module.css
) and assign it ass
for style association.To complete the app building, import the
UserInfo.jsx
file into theApp.jsx
.
To import a file, use the
import
statement and specify the source file.To associate the CSS file with the s, import it using
import s from "path_to_the_file";
.To utilize the UserInfo component within the
App
component, use the syntax</UserInfo />
.
Kiitos palautteestasi!
Kysy tekoälyä
Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme