Skip to content

Instantly share code, notes, and snippets.

@zackify
Last active March 30, 2018 14:09
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 zackify/f7c87bbcd9109e6bbe6bedfc2e6be2bd to your computer and use it in GitHub Desktop.
Save zackify/f7c87bbcd9109e6bbe6bedfc2e6be2bd to your computer and use it in GitHub Desktop.
import React from 'react';
import styles from './styles.css';
export default ({ title, }) => (
<section className={styles.wrapper}>
{title}
</section>
);
/*
If styles.wrapper isn't used, you can get notified in-editor of unused CSS.
on the page it will be [directory]__[filename]___[classname]
Ex:
Given src/components/Button/Button.module.css with a class .primary {},
the generated classname in development will be src-components-Button__Button-module___primary
debugging is super easy since you can always find where the CSS is located
*/
.wrapper {
position: relative;
padding: 40px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment