Responsive Github search app using Reactjs and styled components
Design comparison
Community feedback
- @mseidel819Posted over 2 years ago
I like your solution for light/dark themes! I'm going to study up on how you implemented that.
Something you can do to organize your components is to put all of your styled components in their own folder, and export them out. so, instead of one
SearchApp.js
, you would haveSearchApp.component.js
, andSearchApp.styles.js
.Some of your
.styles.js
folder might then look like :export const Container = styled.div
display: flex; flex-wrap: wrap; margin: 0 auto;export const Header = styled.header
width: 100%; `export const Wrap = styled.div` display: flex; justify-content: space-between; width: 100%; ` export const Title = styled.h1` color: ${Props => Props.theme.titleColor}; font-size: xx-large; transition: all 0.5s ease; ``
and then in your
SearchApp.component.js
, you would import it all:import {Container, Header, Wrap, Title} from "./SearchApp.styles";
Marked as helpful0
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