diff --git a/client/src/components/Input/Input.css b/client/src/components/Input/Input.css index a28d6d1c..92937c7c 100644 --- a/client/src/components/Input/Input.css +++ b/client/src/components/Input/Input.css @@ -15,13 +15,6 @@ input:focus, textarea:focus, select:focus{ outline: none; } -.sendButton { - color: #fff !important; - text-transform: uppercase; - text-decoration: none; - background: #2979FF; - padding: 20px; - display: inline-block; - border: none; - width: 20%; +.sendBtnWidth { + width: 20% !important; } \ No newline at end of file diff --git a/client/src/components/Input/Input.js b/client/src/components/Input/Input.js index feeb9df3..da483e4d 100644 --- a/client/src/components/Input/Input.js +++ b/client/src/components/Input/Input.js @@ -12,7 +12,7 @@ const Input = ({ setMessage, sendMessage, message }) => ( onChange={({ target: { value } }) => setMessage(value)} onKeyPress={event => event.key === 'Enter' ? sendMessage(event) : null} /> - + ) diff --git a/client/src/components/Join/Join.css b/client/src/components/Join/Join.css index fceb6b89..84d06121 100644 --- a/client/src/components/Join/Join.css +++ b/client/src/components/Join/Join.css @@ -38,16 +38,8 @@ html, body { border-bottom: 2px solid white; } -.button { - color: #fff !important; - text-transform: uppercase; - text-decoration: none; - background: #2979FF; - padding: 20px; - border-radius: 5px; - display: inline-block; - border: none; - width: 100%; +.joinBtnWidth { + width: 100%; } .mt-20 { diff --git a/client/src/components/Join/Join.js b/client/src/components/Join/Join.js index 0201b069..f71b41b1 100644 --- a/client/src/components/Join/Join.js +++ b/client/src/components/Join/Join.js @@ -18,7 +18,7 @@ export default function SignIn() { setRoom(event.target.value)} /> (!name || !room) ? e.preventDefault() : null} to={`/chat?name=${name}&room=${room}`}> - + diff --git a/client/src/components/Messages/Message/Message.js b/client/src/components/Messages/Message/Message.js index 2a58d22b..24a2938d 100644 --- a/client/src/components/Messages/Message/Message.js +++ b/client/src/components/Messages/Message/Message.js @@ -4,9 +4,14 @@ import './Message.css'; import ReactEmoji from 'react-emoji'; +const capitalizeName = (name) => { + let data = name + let char = data.slice(0,1).toUpperCase() + return name.replace(data.charAt(0),char) +} + const Message = ({ message: { text, user }, name }) => { let isSentByCurrentUser = false; - const trimmedName = name.trim().toLowerCase(); if(user === trimmedName) { @@ -17,7 +22,7 @@ const Message = ({ message: { text, user }, name }) => { isSentByCurrentUser ? (
-

{trimmedName}

+

{capitalizeName(trimmedName)}

{ReactEmoji.emojify(text)}

@@ -28,7 +33,7 @@ const Message = ({ message: { text, user }, name }) => {

{ReactEmoji.emojify(text)}

-

{user}

+

{capitalizeName(user)}

) ); diff --git a/client/src/index.css b/client/src/index.css new file mode 100644 index 00000000..c60b9f1e --- /dev/null +++ b/client/src/index.css @@ -0,0 +1,15 @@ +.blueBtn { + color: #fff !important; + text-transform: uppercase; + text-decoration: none; + background: #2979FF; + padding: 20px; + display: inline-block; + border: none; + transition: transform 2s; +} + +.blueBtn:hover { + transition: background-color 3s linear; + background-color: #062c6e; +} \ No newline at end of file diff --git a/client/src/index.js b/client/src/index.js index f79e56a7..9758b96a 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -1,6 +1,6 @@ import React from 'react'; import ReactDOM from 'react-dom'; - +import './index.css' import App from './App'; ReactDOM.render(, document.getElementById('root')); \ No newline at end of file