Skip to content

Instantly share code, notes, and snippets.

@epegzz
Last active October 22, 2017 11:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save epegzz/b5f17483771d476971aece2aca873d51 to your computer and use it in GitHub Desktop.
Save epegzz/b5f17483771d476971aece2aca873d51 to your computer and use it in GitHub Desktop.
CSS inline styles, CSS Modules, ReactRouter 2
import React from 'react';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import styles from './MyComponent.scss';
function MyComponent(props, context) {
return (
<div className={styles.container}>
<h1 className={styles.title}>Hello, world!</h1>
<div className={styles.body}>
Here goes some more text…
</div>
</div>
);
}
export default withStyles(styles)(MyComponent);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment