Skip to content

Commit

Permalink
style and add the Canvas component to App component
Browse files Browse the repository at this point in the history
  • Loading branch information
iamtekeste committed Jun 7, 2017
1 parent de2cbcc commit e4b0bf1
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 26 deletions.
34 changes: 16 additions & 18 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
.App {
text-align: center;
display: flex;
}

.App-logo {
animation: App-logo-spin infinite 20s linear;
height: 80px;
.canvas {
display: flex;
height: 100%;
width: 80%;
align-items: center;
justify-content: center;
}

.App-header {
background-color: #222;
height: 150px;
padding: 20px;
color: white;
}

.App-intro {
font-size: large;
}

@keyframes App-logo-spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
.text-editor {
border: none;
padding: 20px 20px;
transition: background .3s ease-in;
width: 90%;
}
.text-editor:focus,
.text-editor:hover {
background: #fff;
}
22 changes: 14 additions & 8 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
import React, { Component } from 'react';
import logo from './logo.svg';
import Canvas from './components/Canvas';
import './App.css';

class App extends Component {
constructor(props) {
super(props);

this.state = {
fontFamily: 'Montserrat',
fontSize: '34px',
fontWeight: 'SemiBold',
textColor: '#9B51E0',
backgroundColor: '#F8F3F3',
};
}

render() {
return (
<div className="App">
<div className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h2>Welcome to React</h2>
</div>
<p className="App-intro">
To get started, edit <code>src/App.js</code> and save to reload.
</p>
<Canvas {...this.state} />
</div>
);
}
Expand Down
7 changes: 7 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@ body {
margin: 0;
padding: 0;
font-family: sans-serif;
height: 100%;
}
html,
body,
#root,
.App {
height: 100%;
}

0 comments on commit e4b0bf1

Please sign in to comment.