-
+
{name}
@{screenName}
diff --git a/examples/css/src/styles/main.css b/examples/css/src/styles/main.css
index a60341a..eb8bbed 100644
--- a/examples/css/src/styles/main.css
+++ b/examples/css/src/styles/main.css
@@ -111,6 +111,10 @@ svg {
color: #1da1f2;
}
+.tweet__text a:hover {
+ text-decoration: underline;
+}
+
.tweet__media {
border-radius: .35rem;
border: 1px solid #e1e8ed;
diff --git a/examples/css/webpack.custom.babel.js b/examples/css/webpack.custom.babel.js
new file mode 100644
index 0000000..19ac6d8
--- /dev/null
+++ b/examples/css/webpack.custom.babel.js
@@ -0,0 +1,13 @@
+import { extendBaseConfig } from '../webpack.base.babel';
+
+export default extendBaseConfig({
+ module: {
+ loaders: [
+ {
+ test: /\.css$/,
+ exclude: /node_modules/,
+ loader: 'style!css',
+ },
+ ],
+ },
+});
diff --git a/examples/jss/src/components/content/content.js b/examples/jss/src/components/content/content.js
index 83e82f0..f7abbbc 100644
--- a/examples/jss/src/components/content/content.js
+++ b/examples/jss/src/components/content/content.js
@@ -8,6 +8,12 @@ const styles = {
lineHeight: '1.5em',
margin: 0,
padding: '.65625rem 0 .98438rem',
+ '& a': {
+ color: '#1da1f2',
+ },
+ '& a:hover': {
+ textDecoration: 'underline',
+ },
},
media: {
borderRadius: '.35rem',
@@ -25,7 +31,7 @@ const styles = {
const Content = ({ text, media, sheet: { classes } }) => (
diff --git a/examples/jss/src/components/footer/footer.js b/examples/jss/src/components/footer/footer.js
index fbd1ba3..f48c1d8 100644
--- a/examples/jss/src/components/footer/footer.js
+++ b/examples/jss/src/components/footer/footer.js
@@ -78,11 +78,9 @@ class Footer extends Component {
this.state = {
liked: false,
};
-
- this.handleClick = this.handleClick.bind(this);
}
- handleClick() {
+ handleClick = () => {
this.setState({
liked: !this.state.liked,
});
diff --git a/examples/jss/src/components/header/header.js b/examples/jss/src/components/header/header.js
index 18c5824..cffad92 100644
--- a/examples/jss/src/components/header/header.js
+++ b/examples/jss/src/components/header/header.js
@@ -42,12 +42,12 @@ const styles = {
const Header = ({ name, profileImageUrl, screenName, url, sheet }) => (
-
+
{name}
@{screenName}
diff --git a/examples/package.json b/examples/package.json
index cad0b78..6dd2392 100644
--- a/examples/package.json
+++ b/examples/package.json
@@ -15,7 +15,9 @@
},
"devDependencies": {
"babel-core": "6.11.4",
+ "babel-eslint": "^6.1.2",
"babel-loader": "6.2.4",
+ "babel-plugin-transform-class-properties": "^6.11.5",
"babel-preset-es2015": "6.9.0",
"babel-preset-react": "6.11.1",
"babel-register": "6.11.6",
diff --git a/examples/radium/src/components/content/content.js b/examples/radium/src/components/content/content.js
index ca4d920..ea29c37 100644
--- a/examples/radium/src/components/content/content.js
+++ b/examples/radium/src/components/content/content.js
@@ -25,7 +25,7 @@ const styles = {
const Content = ({ text, media }) => (
diff --git a/examples/radium/src/components/footer/footer.js b/examples/radium/src/components/footer/footer.js
index fed878b..a4b469d 100644
--- a/examples/radium/src/components/footer/footer.js
+++ b/examples/radium/src/components/footer/footer.js
@@ -79,11 +79,9 @@ class Footer extends Component {
this.state = {
liked: false,
};
-
- this.handleClick = this.handleClick.bind(this);
}
- handleClick() {
+ handleClick = () => {
this.setState({
liked: !this.state.liked,
});
diff --git a/examples/radium/src/components/header/header.js b/examples/radium/src/components/header/header.js
index 138031a..65f5af5 100644
--- a/examples/radium/src/components/header/header.js
+++ b/examples/radium/src/components/header/header.js
@@ -42,12 +42,12 @@ const styles = {
const Header = ({ name, profileImageUrl, screenName, url }) => (
-
+
{name}
@{screenName}
diff --git a/examples/shared/data/755481795206971392.json b/examples/shared/data/755481795206971392.json
index acdba2e..f98ffe4 100644
--- a/examples/shared/data/755481795206971392.json
+++ b/examples/shared/data/755481795206971392.json
@@ -18,7 +18,7 @@
"user": {
"name": "Max Stoiber",
"screen_name": "mxstbr",
- "url": "https:\/\/t.co\/uAtI6h0Zng",
+ "url": "https:\/\/twitter.com\/mxstbr",
"profile_image_url_https": "https:\/\/mxstbr.com\/headshot.jpeg"
},
"retweet_count": 32,
diff --git a/examples/shared/utils/text/text.js b/examples/shared/utils/text/text.js
index 32aac15..6de5cce 100644
--- a/examples/shared/utils/text/text.js
+++ b/examples/shared/utils/text/text.js
@@ -4,14 +4,14 @@ export const transform = data => {
data.entities.user_mentions.forEach(userMention => {
text = text.replace(
`@${userMention.screen_name}`,
- `@${userMention.screen_name}`
+ `
@${userMention.screen_name}`
);
});
data.entities.urls.forEach(url => {
text = text.replace(
url.url,
- `
${url.display_url}`
+ `
${url.display_url}`
);
});
diff --git a/examples/shared/utils/text/text.spec.js b/examples/shared/utils/text/text.spec.js
index d879fe7..6bcb330 100644
--- a/examples/shared/utils/text/text.spec.js
+++ b/examples/shared/utils/text/text.spec.js
@@ -21,7 +21,7 @@ describe('text', () => {
},
};
- const expected = '\ud83d\udc4f Love love love this article by
@chantastic. CSS-in-JS isn\u2019t a campaign against CSS!
medium.com/learnreact/sca…';
+ const expected = '\ud83d\udc4f Love love love this article by
@chantastic. CSS-in-JS isn\u2019t a campaign against CSS!
medium.com/learnreact/sca…';
assert.equal(transform(data), expected);
});