Toggle navigation
Toggle navigation
This project
Loading...
Sign in
강동현
/
nodejs-game
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Overnap
2021-05-27 01:13:17 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2080b073846825dec56cbeb57645c623c500a67e
2080b073
1 parent
08a2e41d
로그인 컴포넌트 css 수정
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
9 deletions
web/src/Login.tsx
web/tailwind.config.js
web/src/Login.tsx
View file @
2080b07
import React, { useContext, useState } from 'react';
import { RouteComponentProps } from 'react-router';
import { Footer } from './Footer';
import SocketContext from './SocketContext';
export const Login: React.FC<RouteComponentProps> = ({ history }) => {
...
...
@@ -7,7 +8,7 @@ export const Login: React.FC<RouteComponentProps> = ({ history }) => {
const [ username, setUsername ] = useState("");
const login = () => {
socket.emit('
LoginMessage
', username, ({ ok } : { ok: boolean }) => {
socket.emit('
login
', username, ({ ok } : { ok: boolean }) => {
if (ok) {
history.push('/rooms');
} else {
...
...
@@ -17,26 +18,28 @@ export const Login: React.FC<RouteComponentProps> = ({ history }) => {
}
return (
<div className="flex flex-col items-center w-screen h-screen">
<div className="mt-auto flex flex-col items-center">
<img className="m-7" src="./logo192.png"/>
<div>
<header>Header</header>
<div className="flex items-center">
<input type="text"
placeholder="Username"
className="px-3 py-2 bg-white
placeholder-gray-3
00 text-gray-700 text-sm
placeholder-gray-4
00 text-gray-700 text-sm
rounded shadow outline-none focus:outline-none"
value={username}
onChange={e => setUsername(e.target.value)}
/>
<button className="bg-green-500 active:bg-green-600
text-white font-bold uppercase text-sm
px-5 py-2 ml-3 rounded shadow hover:shadow-lg
outline-none focus:outline-none
ease-linear transition-all duration-15
0"
px-5 py-2 ml-3 rounded shadow
outline-none focus:outline-none hover:shadow-md
ease-linear transition-all duration-10
0"
type="button"
onClick={() => login()}>Login</button>
</div>
<footer>Footer</footer>
</div>
<Footer/>
</div>
)
}
...
...
web/tailwind.config.js
View file @
2080b07
...
...
@@ -5,7 +5,9 @@ module.exports = {
extend
:
{},
},
variants
:
{
extend
:
{},
extend
:
{
backgroundColor
:
[
'active'
],
},
},
plugins
:
[],
}
...
...
Please
register
or
login
to post a comment