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 />
.
Var alt klart?
Tak for dine kommentarer!
Sektion 2. Kapitel 10
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Awesome!
Completion rate improved to 2.17
Challenge: Use CSS Modules in React
Stryg for at vise menuen
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 />
.
Var alt klart?
Tak for dine kommentarer!
Sektion 2. Kapitel 10