Skip to content

Commit 1c82b7b

Browse files
committed
add register button
1 parent 612cad5 commit 1c82b7b

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

‎src/components/structures/LoginBox.js‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ module.exports = React.createClass({
4747
dis.dispatch({ action: 'start_login' });
4848
},
4949

50+
onRegisterClick: function() {
51+
dis.dispatch({ action: 'start_registration' });
52+
},
53+
5054
render: function() {
5155
var TintableSvg = sdk.getComponent('elements.TintableSvg');
5256

@@ -71,6 +75,9 @@ module.exports = React.createClass({
7175
<AccessibleButton className="mx_LoginBox_loginButton" element="button" onClick={this.onLoginClick}>
7276
{ _t("Login") }
7377
</AccessibleButton>
78+
<AccessibleButton className="mx_LoginBox_registerButton" element="button" onClick={this.onRegisterClick}>
79+
{ _t("Register") }
80+
</AccessibleButton>
7481
</div>
7582
);
7683
}

‎src/skins/vector/css/matrix-react-sdk/structures/_LoginBox.scss‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@ limitations under the License.
1919
width: 100%;
2020
}
2121

22-
.mx_LoginBox_loginButton {
22+
.mx_LoginBox_loginButton,
23+
.mx_LoginBox_registerButton {
2324
margin-top: -8px;
2425
height: 40px;
2526
border: 0px;
2627
border-radius: 40px;
27-
padding-left: 1em;
28-
padding-right: 1em;
28+
margin-left: 4px;
29+
margin-right: 4px;
30+
width: 80px;
2931

3032
background-color: $accent-color;
3133
color: $primary-bg-color;

0 commit comments

Comments
 (0)