Add css to login

This commit is contained in:
Ceda EI 2019-03-29 13:00:37 +05:30
parent cbf48e751c
commit 005cb2172a
4 changed files with 37 additions and 13 deletions

View File

@ -6,9 +6,10 @@ export default (player) => {
const [input, setInput] = useState(localStorage.getItem("token") ? localStorage.getItem("token"): "" ); const [input, setInput] = useState(localStorage.getItem("token") ? localStorage.getItem("token"): "" );
return ( return (
<div className="login"> <div className="login">
<input type="text" placeholder="Token ID" value={input} <div className="wrapper">
<input type="text" placeholder="Token ID" value={input} className="nes-input"
onChange={evt => setInput(evt.target.value)} /> onChange={evt => setInput(evt.target.value)} />
<button <button className="nes-btn is-primary"
onClick={ onClick={
() => player.auth(input) () => player.auth(input)
.then(x => { .then(x => {
@ -19,6 +20,7 @@ export default (player) => {
}) })
}>Submit</button> }>Submit</button>
</div> </div>
</div>
); );
} }

View File

View File

@ -1,6 +1,7 @@
import React, { useState } from "react"; import React, { useState } from "react";
import ReactDOM from "react-dom"; import ReactDOM from "react-dom";
import "./index.css"; import "./scss/index.scss";
import "nes.css/css/nes.min.css";
import { config } from "./config"; import { config } from "./config";
import axios from "axios"; import axios from "axios";
import login from "./components/login"; import login from "./components/login";

21
src/scss/index.scss Normal file
View File

@ -0,0 +1,21 @@
.login {
padding: 15%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
box-sizing: border-box;
.wrapper {
width: 100%;
input {
margin-bottom: 1em;
width: 100%;
display: block;
}
button {
width: 100%;
display: block;
}
}
}