diff --git a/src/App.css b/src/App.css index d97beb4e6..8c8ae257d 100644 --- a/src/App.css +++ b/src/App.css @@ -1,52 +1,133 @@ #App { - background-color: #87cefa; -} + background-color: white; -#App header { - background-color: #222; - color: #fff; - padding-bottom: 0.5rem; - position: fixed; - width: 100%; - z-index: 100; - text-align: center; - align-items: center; -} + header { + background-color: #e9ecef; + color: black; + position: fixed; + width: 100%; + z-index: 100; + text-align: center; + align-items: center; + } -#App main { - padding-left: 2em; - padding-right: 2em; - padding-bottom: 5rem; - padding-top: 10rem; -} + main { + padding-left: 2em; + padding-right: 2em; + padding-bottom: 5rem; + padding-top: 10rem; + } -#App h1 { - font-size: 1.5em; - text-align: center; - display: inline-block; -} + h1 { + font-size: 1.5em; + text-align: center; + display: inline-block; + padding-top: 0.5em; + } -#App header section { - background-color: #e0ffff; -} + header section { + background-color: #e0ffff; + } -#App .widget { - display: inline-block; - line-height: 0.5em; - border-radius: 10px; - color: black; - font-size:0.8em; - padding-left: 1em; - padding-right: 1em; -} + .widget { + display: inline-block; + line-height: 0.5em; + border-radius: 10px; + color: black; + font-size:0.8em; + padding: 1em; + font-weight: bold; + } + + #heartWidget { + display: flex; + align-items: center; + justify-content: center; + font-size: 1.5em; + margin: 0.25em; + } -#App #heartWidget { - font-size: 1.5em; - margin: 1em + span { + display: inline-block; + } } -#App span { - display: inline-block +#AppDark { + background-color: #343a40; + + header { + background-color: #222; + color: #fff; + position: fixed; + width: 100%; + z-index: 100; + text-align: center; + align-items: center; + } + + main { + padding-left: 2em; + padding-right: 2em; + padding-bottom: 5rem; + padding-top: 10rem; + } + + h1 { + font-size: 1.5em; + text-align: center; + display: inline-block; + padding-top: 0.5em; + } + + h2 { + color: white; + } + + .entry-bubble p { + color: white; + } + + .local .entry-bubble { + background-color: #212529; + } + + .local .entry-bubble::before { + background-color: #212529; + } + + .remote .entry-bubble { + background-color: #2a6f97; + } + + .remote .entry-bubble::before { + background-color: #2a6f97; + } + + header section { + background-color: #00568a; + } + + .widget { + display: inline-block; + line-height: 0.5em; + border-radius: 10px; + color: white; + font-size:0.8em; + padding: 1em; + font-weight: bold; + } + + #heartWidget { + display: flex; + align-items: center; + justify-content: center; + font-size: 1.5em; + margin: 0.25em; + } + + span { + display: inline-block + } } .red { diff --git a/src/App.jsx b/src/App.jsx index 14a7f684d..161a2fdd1 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,14 +1,41 @@ import './App.css'; +import CHATS from './data/messages.json'; +import ChatLog from './components/ChatLog'; +import { useState } from 'react'; +import DarkMode from './dark-mode/DarkMode'; + const App = () => { + const [chatData, setChatData] = useState(CHATS); + const [theme, setTheme] = useState('App'); + + const handleLikedMessages = (id) => { + setChatData(chatData => chatData.map(chat => { + if (chat.id === id) { + return { ...chat, liked: !chat.liked }; + } else { + return chat; + } + })); + }; + + const toggleDarkMode = (mode) => { + setTheme(mode); + }; + + const likedCount = chatData.filter((chat) => chat.liked).length; + return ( -
Replace with body of ChatEntry
-Replace with TimeStamp component
- -{body}
+
+