Last active
December 12, 2018 00:06
-
-
Save phylliswong/6ce064d9d98ca1fcf5667ab7c6ed5d96 to your computer and use it in GitHub Desktop.
Square with CSS stylesheet
This file contains hidden or 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, { Component } from 'react'; | |
import './Square2.css'; | |
class Square extends Component { | |
render () { | |
return ( | |
<div className='sq2-container'> | |
<h1 className='sq2-title'>Even better title</h1> | |
<p className='sq-content'>Much improved content</p> | |
</div> | |
) | |
} | |
} |
This file contains hidden or 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
html, body { | |
height: 100%; | |
} | |
body { | |
background: #333; | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
font-family: Roboto sans-serif; | |
} | |
.sq2-container { | |
height: 300px; | |
width: 300px; | |
border: 2px solid red; | |
border-radius: 5px; | |
display: flex; | |
flex-direction: column; | |
justify-content: center; | |
align-items: center; | |
background-color: white; | |
} | |
.sq2-title { | |
margin: 0; | |
padding: 0; | |
font-family: Roboto sans-serif; | |
} | |
.sq-content { | |
font-family: Arial sans-serif; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment