@ApplePieGiraffe
Posted
Hi, Enayar! 👋
Good job on this challenge! 👏 I like the smooth transitions that you added to the various interactive elements of the page (such as the modals) and the styled scroll bars! 👍
It's also great to hear that you signed up for a Pro subscription (since I think that really helps speed things up and unlocks a whole bunch of neat challenges)! 😀
When it comes to naming your styled-components, I think you should probably go with whatever names describe the function or purpose of the component well and are understandable to you (and to any others that might read your code). Since styled-components automatically generates class names for you, methodologies like BEM are probably irrelevant (unless you are actually using a few classes, anyway, perhaps). One thing that might be useful to keep in mind is that styled-components are scoped to the files that you create them in, so you can simply name things as Wrapper
instead of ModalWrapper
or ButtonWrapper
if they are in separate files, I believe. 😉
I'm somewhat new to React, too, but maybe you could add a "selected" property to each object that holds the data for each funding option. Every time a user selects an option, you could use a function that you would pass down from the parent component to set the "selected" properties of all the other funding options to "false" and set the "selected" property of the current property to "true". IDK, there may be a much better way of doing things, but that's one idea, I guess. 😅
Hope that helps! 😀 Let me know if you'd like more info on anything. 👍
Keep coding (and happy coding, too)! 😁
@RayaneBengaoui
Posted
@ApplePieGiraffe Hello APG ! 👋
Thank you for your extensive feedback ! Yes you're right on the naming, I just realized that it doesn't make much sense to use ModalWrapper
instead of Wrapper
.
I'll try to implement what you say for the toggle. By the way I've read your guide on frontend mentor that you wrote and it's super cool ! Didn't know about PerfectPixel extension before, so It might help me a lot ! :)
Have a nice day ☀️
@ApplePieGiraffe
Posted
@RayaneBengaoui
Haha, thanks! Have a nice day, too! 👍
@RayaneBengaoui
Posted
@ApplePieGiraffe I just applied your logic and now it works like a charm ! Thanks again 😀
@ApplePieGiraffe
Posted
@RayaneBengaoui
Sweet! 👍
I just took another look at the updated site, too, and everything does work well! 😀