Created
January 1, 2020 07:36
-
-
Save siisee11/4c5959e998d70677798f9d8fae378b71 to your computer and use it in GitHub Desktop.
about-css-modules.js
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 React from "react" | |
import styles from "./about-css-modules.module.css" | |
import Container from "../components/container" | |
console.log(styles) | |
const User = props => ( | |
<div className={styles.user}> | |
<img src={props.avatar} className={styles.avatar} alt="" /> | |
<div className={styles.description}> | |
<h2 className={styles.username}>{props.username}</h2> | |
<p className={styles.excerpt}>{props.excerpt}</p> | |
</div> | |
</div> | |
) | |
export default () => ( | |
<Container> | |
<h1>About CSS Modules</h1> | |
<p>CSS Modules are cool</p> | |
<User | |
username="Jane Doe" | |
avatar="https://s3.amazonaws.com/uifaces/faces/twitter/adellecharles/128.jpg" | |
excerpt="I'm Jane Doe. Lorem ipsum dolor sit amet, consectetur adipisicing elit." | |
/> | |
<User | |
username="Bob Smith" | |
avatar="https://s3.amazonaws.com/uifaces/faces/twitter/vladarbatov/128.jpg" | |
excerpt="I'm Bob Smith, a vertically aligned type of guy. Lorem ipsum dolor sit amet, consectetur adipisicing elit." | |
/> | |
</Container> | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment