Skip to content

Commit 864ca29

Browse files
authored
feat(playground): optimize dark mode (#78)
1 parent dc2b43d commit 864ca29

15 files changed

Lines changed: 254 additions & 36 deletions

playground/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"react": "^19.1.1",
3232
"react-dom": "^19.1.1",
3333
"typescript": "~5.8.3",
34-
"vite": "npm:rolldown-vite@^7.1.14"
34+
"vite": "npm:rolldown-vite@^7.1.14",
35+
"vite-plugin-svgr": "^4.5.0"
3536
}
3637
}

playground/src/App.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,26 @@ function App() {
3030
className={clsx(
3131
"min-h-screen bg-gradient-to-b",
3232
"from-blue-300 via-pink-100 via-10% to-violet-300",
33-
"dark:from-[#a77693] dark:via-[#174871] dark:via-80% dark:to-[#0f2d4d]",
33+
"dark:from-[#865f77] dark:via-[#133b5c] dark:via-80% dark:to-[#091e35]",
3434
)}
3535
>
3636
<div className="flex h-screen py-2 pr-2">
3737
<div className="flex shrink-0 flex-col justify-between w-15 bg-transparent">
3838
<div className="flex flex-col gap-0.5">
3939
<div className="flex flex-col items-center mt-2 gap-1.5">
4040
<img alt="MateChat logo" className="w-9 h-9" src={mcLogo} />
41-
<span className="text-[10px] font-bold">MateChat</span>
41+
<span className="text-[10px] font-bold dark:text-gray-200">
42+
MateChat
43+
</span>
4244
</div>
43-
<hr className="w-7/13 mx-auto my-4 border-gray-400" />
45+
<hr className="w-7/13 mx-auto my-4 border-gray-400 dark:border-gray-300" />
4446
<div className="flex flex-col items-center gap-1.5 cursor-pointer">
4547
<img
4648
alt="Chat icon"
47-
className="bg-white p-1.5 rounded-lg shadow-[3px_3px_8px_rgb(0,0,0,0.1)]"
49+
className="bg-white dark:bg-pink-200/20 p-1.5 rounded-lg shadow-[3px_3px_8px_rgb(0,0,0,0.1)]"
4850
src={chatIcon}
4951
/>
50-
<span className="text-xs">{t("chat")}</span>
52+
<span className="text-xs dark:text-gray-200">{t("chat")}</span>
5153
</div>
5254
</div>
5355
<div className="flex flex-col justify-center items-center gap-4 mb-3.5">
@@ -61,6 +63,7 @@ function App() {
6163
className={clsx(
6264
"w-1/4 p-3 rounded-l-xl min-w-[240px] max-w-[380px]",
6365
"bg-gradient-to-b from-gray-100/80 from-10% to-violet-100/80",
66+
"dark:bg-none dark:bg-slate-900/40",
6467
)}
6568
>
6669
<History />
@@ -69,6 +72,7 @@ function App() {
6972
className={clsx(
7073
"flex-1 rounded-r-xl",
7174
"bg-gradient-to-b from-[#fffffff2] to-[#f8fafff2]",
75+
"dark:bg-none dark:bg-black/35",
7276
)}
7377
>
7478
<Communicate />

playground/src/assets/react.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

playground/src/assets/search.svg

Lines changed: 2 additions & 2 deletions
Loading

playground/src/assets/setting.svg

Lines changed: 2 additions & 2 deletions
Loading

0 commit comments

Comments
 (0)