Skip to content

Commit f487b9b

Browse files
committed
Make it log in
1 parent eeb2dfd commit f487b9b

5 files changed

Lines changed: 46 additions & 0 deletions

File tree

‎css/common.css‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
div.error {
2+
color: red;
3+
}

‎css/molecules/ProgressBar.css‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.mx_ProgressBar {
2+
height: 5px;
3+
border-radius: 5px;
4+
border: 1px solid black;
5+
margin-bottom: 10px;
6+
}
7+
8+
.mx_ProgressBar_fill {
9+
height: 100%;
10+
background-color: #666;
11+
transition: width 0.1s ease;
12+
}

‎css/templates/Login.css‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.mx_Login {
2+
width: 600px;
3+
height: 350px;
4+
margin-left: auto;
5+
margin-right: auto;
6+
padding: 10px;
7+
text-align: center;
8+
background-color: #eee;
9+
border: 1px solid black;
10+
}
11+

‎example/index.html‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
<body>
88
<section id="matrixchat"></section>
99
<script src="bundle.js"></script>
10+
<link rel="stylesheet" href="bundle.css">
1011
</body>
1112
</html>

‎src/molecules/ProgressBar.js‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
var React = require('react');
2+
3+
module.exports = React.createClass({
4+
propTypes: {
5+
value: React.PropTypes.number,
6+
max: React.PropTypes.number
7+
},
8+
9+
render: function() {
10+
// Would use an HTML5 progress tag but if that doesn't animate if you
11+
// use the HTML attributes rather than styles
12+
var progressStyle = {
13+
width: ((this.props.value / this.props.max) * 100)+"%"
14+
};
15+
return (
16+
<div className="mx_ProgressBar"><div className="mx_ProgressBar_fill" style={progressStyle}></div></div>
17+
);
18+
}
19+
});

0 commit comments

Comments
 (0)