Design comparison
Solution retrospective
I spent three days building it, and I have some questions. I look forward to hearing from you guys with any feedback.
- I built it with vite react and already "npm run build" it and the icon won't show
- I'm struggling to add interactivity class for the navbar(weekly,daily,monthly)
- I'm not quite satisfied with my code so i want to refactor it but i dont know where to start
if you have feedbacks and suggestions I'd like to hear that, thankyou<3
- i already fix issue number 1
Community feedback
- @allmtzPosted almost 2 years ago
Hey ihza nice solution ! Regarding question 2:
You could conditionally style the clicked timeframe using a ternary. For example the "Daily" option:
<a onClick={clickGetId} id="daily" className={ `${clickedId === "daily" ? "text-red-400" : "text-white"} cursor-pointer ` } > Daily </a>
In this example the text will turn red when it's clicked on but you could replace
text-red-400
with any styling you want. Let me know if this works for you !Marked as helpful1 - @ihzavipPosted almost 2 years ago
I forgot to mention that i use map in order to render the time card so i don't really like the code i hope you guys can help me out
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord