diff --git a/client/src/components/TextContainer/TextContainer.css b/client/src/components/TextContainer/TextContainer.css index 19aa5770..46f6edac 100644 --- a/client/src/components/TextContainer/TextContainer.css +++ b/client/src/components/TextContainer/TextContainer.css @@ -1,33 +1,107 @@ +/* =========================== + TextContainer Styles + Updated for better clarity, + modern look, and accessibility + =========================== */ + .textContainer { display: flex; flex-direction: column; - margin-left: 100px; - color: white; - height: 60%; - justify-content: space-between; + justify-content: flex-start; + align-items: center; + padding: 1rem; + font-family: 'Arial', sans-serif; + color: #333; + text-align: center; + background-color: #fafafa; + border-radius: 8px; + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); +} + +/* Intro Section */ +.intro h1 { + font-size: 2rem; + font-weight: 600; + margin-bottom: 0.5rem; + color: #111; +} + +.intro h2 { + font-size: 1.1rem; + margin-bottom: 0.5rem; + color: #555; +} + +/* Users Section */ +.usersSection { + margin-top: 2rem; + width: 100%; + max-width: 320px; } +/* Active User List Container */ .activeContainer { display: flex; - align-items: center; - margin-bottom: 50%; + flex-direction: column; + gap: 0.6rem; + max-height: 220px; + overflow-y: auto; + padding: 0.7rem; + border: 1px solid #e2e2e2; + border-radius: 0.6rem; + background-color: #ffffff; + scrollbar-width: thin; + scrollbar-color: #ccc transparent; } +/* Scrollbar Styling for WebKit browsers */ +.activeContainer::-webkit-scrollbar { + width: 6px; +} +.activeContainer::-webkit-scrollbar-thumb { + background-color: #ccc; + border-radius: 3px; +} + +/* Individual Active Item */ .activeItem { display: flex; align-items: center; + gap: 0.6rem; + padding: 0.4rem 0.6rem; + border-radius: 0.4rem; + transition: background-color 0.2s ease, transform 0.1s ease; + cursor: default; +} + +.activeItem:hover { + background-color: #e6f7ff; + transform: scale(1.02); } -.activeContainer img { - padding-left: 10px; +/* Online Icon */ +.onlineIcon { + width: 16px; + height: 16px; } -.textContainer h1 { - margin-bottom: 0px; +/* Username Text */ +.username { + font-weight: 500; + color: #222; } -@media (min-width: 320px) and (max-width: 1200px) { - .textContainer { - display: none; +/* Responsive Design */ +@media (max-width: 480px) { + .intro h1 { + font-size: 1.6rem; } -} \ No newline at end of file + + .usersSection { + max-width: 90%; + } + + .activeContainer { + max-height: 180px; + } +} diff --git a/client/src/components/TextContainer/TextContainer.js b/client/src/components/TextContainer/TextContainer.js index 94aeeaca..ef33eef7 100644 --- a/client/src/components/TextContainer/TextContainer.js +++ b/client/src/components/TextContainer/TextContainer.js @@ -1,36 +1,35 @@ import React from 'react'; - import onlineIcon from '../../icons/onlineIcon.png'; - import './TextContainer.css'; const TextContainer = ({ users }) => (