forked from styled-components/comparison
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0e173f6
commit 3ba0076
Showing
12 changed files
with
148 additions
and
30 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.header { | ||
display: flex; | ||
padding: 1rem 0 .65625rem; | ||
} | ||
|
||
.profile { | ||
flex: 1 0 0; | ||
margin: 0 .3rem; | ||
} | ||
|
||
.image { | ||
border-radius: .35rem; | ||
width: 100%; | ||
} | ||
|
||
.user { | ||
flex: 7 0 0; | ||
margin: 0 .3rem; | ||
} | ||
|
||
.url { | ||
text-decoration: none; | ||
} | ||
|
||
.name { | ||
color: #292f33; | ||
font-weight: 700; | ||
} | ||
|
||
.screenName { | ||
color: #8899a6; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React, { PropTypes } from 'react' | ||
|
||
import styles from './header.css' | ||
|
||
const Header = ({ user }) => ( | ||
<div className={styles.header}> | ||
<div className={styles.profile}> | ||
<a href={user.url}> | ||
<img className={styles.image} src={user.profile_image_url_https} alt={user.name} /> | ||
</a> | ||
</div> | ||
<div className={styles.user}> | ||
<a className={styles.url} href={user.url}> | ||
<div className={styles.name}>{user.name}</div> | ||
<div className={styles.screenName}>@{user.screen_name}</div> | ||
</a> | ||
</div> | ||
</div> | ||
) | ||
|
||
Header.propTypes = { | ||
user: PropTypes.object, | ||
} | ||
|
||
export default Header |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './header' |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
body { | ||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | ||
.container { | ||
padding: 0 .6rem; | ||
} | ||
|
||
svg { | ||
fill: currentColor; | ||
height: 30px; | ||
.media { | ||
border-radius: .35rem; | ||
border: 1px solid #e1e8ed; | ||
display: block; | ||
} | ||
|
||
.main { | ||
color: #292f33; | ||
.image { | ||
max-width: 100%; | ||
} | ||
|
||
.actions { | ||
color: #8899a6; | ||
font-size: 1.5rem; | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
html { | ||
color: #292f33; | ||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | ||
font-size: 14px; | ||
line-height: 1.3125; | ||
} | ||
|
||
svg { | ||
fill: currentColor; | ||
height: 1.25em; | ||
} | ||
|
||
.container { | ||
margin: 0 auto; | ||
width: 100%; | ||
} | ||
|
||
@media screen and (min-width: 360px) { | ||
html { | ||
font-size: 15px; | ||
} | ||
|
||
.container { | ||
max-width: 400px; | ||
} | ||
} | ||
|
||
@media screen and (min-width: 600px) { | ||
html { | ||
font-size: 16px; | ||
} | ||
|
||
.container { | ||
max-width: 600px; | ||
} | ||
} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from 'react' | ||
|
||
import Tweet from 'components/tweet' | ||
import data from 'data/755481795206971392.json' | ||
|
||
import styles from './app.css' | ||
|
||
const App = () => ( | ||
<div className={styles.container}> | ||
<Tweet data={data} /> | ||
</div> | ||
) | ||
|
||
export default App |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './app' |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
import React from 'react' | ||
import { render } from 'react-dom' | ||
|
||
import Tweet from 'components/tweet' | ||
import data from 'data/755481795206971392.json' | ||
import App from 'containers/app' | ||
|
||
render(<Tweet data={data} />, document.body) | ||
render(<App />, document.body) |