Skip to content

Commit

Permalink
[Finishes] Added timecontrol
Browse files Browse the repository at this point in the history
  • Loading branch information
samkahchiin committed Apr 10, 2020
1 parent fe9e7ff commit aab1300
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import React from 'react';
import './App.css';
import ControlPanel from './containers/ControlPanel/ControlPanel';

function App() {
return (
<div className="App">
<ControlPanel />
</div>
);
}
Expand Down
Empty file.
Empty file.
Empty file.
17 changes: 17 additions & 0 deletions src/components/TimeControl/TimeControl.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from 'react';
import classes from './TimeControl.module.css'

const timeControl = (props) => {
return (
<div className={classes.TimeControl}>
<h1>{props.type + " Length"}</h1>
<p>
<span><i className={classes.ArrowUp}/></span>
<span className={classes.Duration}>{props.duration}</span>
<span><i className={classes.ArrowDown}/></span>
</p>
</div>
);
};

export default timeControl;
29 changes: 29 additions & 0 deletions src/components/TimeControl/TimeControl.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.TimeControl {
}

.TimeControl h1 {
text-transform: capitalize;
}

.TimeControl i{
border: solid black;
border-width: 0 6px 6px 0;
display: inline-block;
padding: 5px;
margin: 0 10px;
}

.TimeControl .Duration {
font-size: 30px;
font-weight: bold;
}

.ArrowUp {
transform: rotate(-135deg);
-webkit-transform: rotate(-135deg);
}

.ArrowDown {
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
}
Empty file added src/components/Timer/Timer.js
Empty file.
12 changes: 12 additions & 0 deletions src/containers/ControlPanel/ControlPanel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React, { Component } from 'react';
import TimeControl from '../../components/TimeControl/TimeControl';

class ControlPanel extends Component {
render() {
return(
<TimeControl type="break" duration={3}/>
);
}
}

export default ControlPanel;

0 comments on commit aab1300

Please sign in to comment.