Last active
August 10, 2018 21:01
-
-
Save orrybaram/1c7d0c9c4d788db0c672e82001114ed5 to your computer and use it in GitHub Desktop.
Naming Styled Components
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Navigation = styled.div`/* styles */`; | |
const Navigation = () => ( | |
<Navigation /> | |
); | |
// => JS interpreter: "I can't believe you've done this x_x" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Header from 'Components/Header'; | |
const Navigation = () => ( | |
<div className="Navigation"> | |
<Header>{headerContent}</Header> | |
<div className="Navigation__Content">{content}</div> | |
</div> | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Header from 'Components/Header'; | |
import { Wrapper, Content } from './styles'; | |
const Navigation = () => ( | |
<Wrapper> | |
<Header>{headerContent}</Header> | |
<Content>{content}</Content> | |
</Wrapper> | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Header from 'Components/Header'; | |
import { StyledNavigation, Content } from './styles'; | |
const Navigation = () => ( | |
<StyledNavigation> | |
<Header>{headerContent}</Header> | |
<Content>{content}</Content> | |
</StyledNavigation> | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Header from 'Components/Header'; | |
import * as S from './styles'; | |
const Navigation = () => ( | |
<S.Navigation> | |
<Header>{headerContent}</Header> | |
<S.Content>{content}</S.Content> | |
</S.Navigation> | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Header from 'Components/Header'; | |
const S = {}; | |
S.Navigation = styled.div`/* styles */`; | |
S.Content = styled.div`/* styles */`; | |
const Navigation = () => ( | |
<S.Navigation> | |
<Header>{headerContent}</Header> | |
<S.Content>{content}</S.Content> | |
</S.Navigation> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment