Skip to content

Commit 597f0a9

Browse files
committed
Tweak styles to match current theme
1 parent 8ad7e39 commit 597f0a9

File tree

4 files changed

+50
-52
lines changed

4 files changed

+50
-52
lines changed

src/widgets/Notepad.css

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,37 @@
44
display: flex;
55
flex-direction: column;
66
padding: 12px;
7-
box-sizing: border-box;
8-
9-
/* card style */
10-
background-color: #ffffff;
11-
border-radius: 12px;
12-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
13-
border: 1px solid #e0e0e0;
147
}
158

169
.title {
1710
font-size: 1.2rem;
1811
font-weight: 700;
1912
margin-bottom: 10px;
20-
color: #000;
13+
color: #fffc;
2114
text-align: center;
2215
}
2316

2417
/* The note area */
2518
.textarea {
26-
flex: 1;
27-
width: 100%;
19+
flex: 1;
20+
width: 100%;
2821
resize: none;
29-
border: 1px solid #ccc;
30-
border-radius: 8px;
3122
padding: 10px;
3223
font-size: 0.95rem;
3324
font-family: "Inter", sans-serif;
34-
color: #000;
35-
background-color: #fafafa;
36-
box-sizing: border-box;
25+
color: #fffc;
26+
background-color: #fff0;
3727
outline: none;
38-
transition: border-color 0.2s, background-color 0.2s;
28+
transition:
29+
border-color 0.2s,
30+
background-color 0.2s;
31+
}
32+
33+
.textarea::placeholder {
34+
color: #fff6;
3935
}
4036

4137
.textarea:focus {
42-
border-color: #4CAF50;
43-
background-color: #fff;
44-
}
38+
border-color: #fff4;
39+
background-color: #0002;
40+
}

src/widgets/Notepad.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React, { useState, useEffect } from "react";
2+
import globalStyles from "../App.css";
23
import styles from "./Notepad.css";
34

45
export function Notepad() {
@@ -16,14 +17,14 @@ export function Notepad() {
1617
}, [note]);
1718

1819
return (
19-
<div className={styles.body}>
20+
<div className={[globalStyles.container, styles.body].join(" ")}>
2021
<h3 className={styles.title}>My Notes</h3>
2122
<textarea
22-
className={styles.textarea}
23+
className={[globalStyles.container, styles.textarea].join(" ")}
2324
value={note}
2425
onChange={(e) => setNote(e.target.value)}
2526
placeholder="Type your notes here..."
2627
/>
2728
</div>
2829
);
29-
}
30+
}

src/widgets/ToDoList.css

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,29 @@
44
height: 100%;
55
display: flex;
66
flex-direction: column;
7-
align-items: stretch; /* stretch title and list to full width */
7+
align-items: stretch; /* stretch title and list to full width */
88
justify-content: flex-start;
99
padding: 12px;
1010
box-sizing: border-box;
1111
overflow: hidden;
12-
13-
/* Card style */
14-
background-color: #ffffff; /* white card */
15-
border-radius: 12px; /* rounded corners */
16-
box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* subtle shadow */
17-
border: 1px solid #e0e0e0; /* light border for card separation */
1812
}
1913

2014
/* Title at the top */
2115
.title {
2216
font-size: 1.2rem;
2317
font-weight: 700;
2418
margin-bottom: 10px;
25-
color: #000;
19+
color: #fffc;
2620
text-align: center;
2721
}
2822

2923
/* Task list */
3024
.todo-list {
31-
list-style: none; /* remove default bullets */
25+
list-style: none; /* remove default bullets */
3226
padding: 0;
3327
margin: 0 0 10px 0;
34-
flex: 1; /* fill available space */
35-
overflow-y: auto; /* scroll if too many tasks */
28+
flex: 1; /* fill available space */
29+
overflow-y: auto; /* scroll if too many tasks */
3630
}
3731

3832
/* Each task item */
@@ -41,31 +35,32 @@
4135
justify-content: space-between;
4236
align-items: center;
4337
padding: 6px 8px;
44-
border-bottom: 1px solid #f0f0f0;
38+
border-bottom: 1px solid #fff4;
39+
border-radius: 4px;
4540
cursor: pointer;
4641
transition: background 0.2s;
4742
}
4843

4944
.todo-list li:hover {
50-
background-color: #f9f9f9; /* subtle hover effect */
45+
background-color: #fff2; /* subtle hover effect */
5146
}
5247

5348
/* Bullet point before task */
5449
.todo-list li span::before {
5550
content: "•";
56-
color: #4CAF50;
51+
color: #fff8;
5752
display: inline-block;
5853
width: 1em;
5954
margin-right: 6px;
60-
font-size: 1.3rem; /* bigger bullet */
55+
font-size: 1.3rem; /* bigger bullet */
6156
line-height: 1;
6257
vertical-align: middle;
6358
}
6459

6560
/* Task text */
6661
.todo-list li span {
67-
color: #000; /* black text */
68-
flex: 1; /* fill available width */
62+
color: #fffc; /* black text */
63+
flex: 1; /* fill available width */
6964
}
7065

7166
/* Completed task style */
@@ -76,9 +71,9 @@
7671

7772
/* Checkmark delete button */
7873
.delete-task {
79-
background: transparent; /* empty square */
80-
border: 2px solid #4CAF50; /* green border */
81-
color: #4CAF50; /* green checkmark */
74+
background: transparent; /* empty square */
75+
border: 2px solid #fff4; /* green border */
76+
color: #fff8; /* green checkmark */
8277
border-radius: 4px;
8378
width: 22px;
8479
height: 22px;
@@ -90,11 +85,13 @@
9085
justify-content: center;
9186
padding: 0;
9287
line-height: 1;
93-
transition: background 0.2s, color 0.2s;
88+
transition:
89+
background 0.2s,
90+
color 0.2s;
9491
}
9592

9693
.delete-task:hover {
97-
background: #e6f4ea; /* light green background on hover */
94+
background: #fff4; /* light green background on hover */
9895
}
9996

10097
/* Input container */
@@ -107,28 +104,28 @@
107104
.todo-input-container input {
108105
flex: 1;
109106
padding: 6px 8px;
110-
border: 1px solid #ccc;
111107
border-radius: 6px;
112108
font-size: 0.95rem;
109+
color: #fffc;
113110
outline: none;
114111
transition: border-color 0.2s;
115112
}
116113

117114
.todo-input-container input:focus {
118-
border-color: #4CAF50; /* green accent on focus */
115+
border-color: #fff4; /* green accent on focus */
119116
}
120117

121118
.todo-input-container button {
122119
padding: 6px 12px;
123-
border: none;
120+
border: 1px solid #fff2;
124121
border-radius: 6px;
125-
background-color: #4CAF50;
122+
background-color: #fff4;
126123
color: #fff;
127124
font-weight: 600;
128125
cursor: pointer;
129126
transition: background 0.2s;
130127
}
131128

132129
.todo-input-container button:hover {
133-
background-color: #43a047;
130+
background-color: #fff6;
134131
}

src/widgets/ToDoList.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import React, { useState, useEffect } from "react";
2+
3+
import globalStyles from "../App.css";
24
import styles from "./ToDoList.css";
5+
import { XIcon } from "@phosphor-icons/react";
36

47
interface Task {
58
text: string;
@@ -40,10 +43,10 @@ export function ToDoList() {
4043
};
4144

4245
return (
43-
<div className={styles.body}>
46+
<div className={[globalStyles.container, styles.body].join(" ")}>
4447
{/* Title at the top */}
4548
<h3 className={styles.title}>My To-Do List</h3>
46-
49+
4750
<ul className={styles["todo-list"]}>
4851
{tasks.map((task, i) => (
4952
<li
@@ -59,14 +62,15 @@ export function ToDoList() {
5962
deleteTask(i);
6063
}}
6164
>
62-
65+
<XIcon weight="bold"></XIcon>
6366
</button>
6467
</li>
6568
))}
6669
</ul>
6770

6871
<div className={styles["todo-input-container"]}>
6972
<input
73+
className={globalStyles.container}
7074
value={input}
7175
onChange={(e) => setInput(e.target.value)}
7276
placeholder="Add a new task..."

0 commit comments

Comments
 (0)