Closed geraldiner closed 8 months ago
Based on Advent of CSS Challenge #1
Create an Icon component that:
Icon
name
size
24
<svg>
null
Approach:
Icon.jsx
client/src/components
Footer.jsx
svg
client/src/images/icons
prop
id
LoginPage.jsx
<Icon id="calendar" />
The addition I believe that this will help, Thanks!!
Based on Advent of CSS Challenge #1
Create an
Icon
component that:name
prop that is required.size
prop that is optional. The default value should be24
.<svg>
with the givenname
andsize
. Returnsnull
if noname
is given.Approach:
Icon.jsx
file in theclient/src/components
folder.Icon.jsx
rendered on LoginPage.jsx.Footer.jsx
is being rendered in this file.Icon.jsx
to render ansvg
image instead (try hardcoding one of the actual icon images fromclient/src/images/icons
).Icon.jsx
to accept aprop
that allows it to render a specific icon image based on anid
.Icon.jsx
to accept aprop
that allows it to render at a specific size.Icon
component onLoginPage.jsx
and pass aid
prop, ex:<Icon id="calendar" />
.Icon
component behaves as it's supposed to.