Skip to content

Commit

Permalink
[Finishes] Added Display
Browse files Browse the repository at this point in the history
  • Loading branch information
samkahchiin committed Apr 10, 2020
1 parent 2f4352e commit 57cebc9
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/components/Display/Display.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react';
import classes from './Display.module.css'

const display = (props) => {
return (
<div className={classes.Display}>
<h2>{props.type}</h2>
<h1>{props.duration}</h1>
</div>
)
}

export default display;
7 changes: 7 additions & 0 deletions src/components/Display/Display.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.Display {

}

.Display h2 {
text-transform: capitalize;
}
Empty file removed src/components/Timer/Timer.js
Empty file.
6 changes: 6 additions & 0 deletions src/containers/ControlPanel/ControlPanel.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import React, { Component } from 'react';
import BreakControl from '../../components/TimeControl/BreakControl/BreakControl';
import SessionControl from '../../components/TimeControl/SessionControl/SessionControl';
import Display from '../../components/Display/Display';

const BREAK = 'break';
const SESSION = 'session';

class ControlPanel extends Component {
state = {
type: SESSION,
breakLength: 1,
sessionLength: 25
}
Expand Down Expand Up @@ -49,6 +54,7 @@ class ControlPanel extends Component {
increase={this.increaseSessionHandler}
decrease={this.decreaseSessionHandler}
/>
<Display type={this.state.type} duration={this.state.sessionLength}/>
</div>
);
}
Expand Down

0 comments on commit 57cebc9

Please sign in to comment.