Skip to content

Commit d8a3423

Browse files
committed
installed react-icons package in client, replaced icon placeholders with relevant icon, added placeholder text styling to new topic input to make text visible
1 parent 2a74b20 commit d8a3423

7 files changed

Lines changed: 33 additions & 15 deletions

File tree

client/package-lock.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"next": "15.4.7",
2828
"react": "19.1.0",
2929
"react-dom": "19.1.0",
30+
"react-icons": "^5.5.0",
3031
"tailwind-merge": "^3.3.1",
3132
"tailwindcss-animate": "^1.0.7"
3233
},

client/src/components/task_item.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { useState } from "react";
2+
import { FaRegEdit } from "react-icons/fa";
3+
import { FaRegTrashCan } from "react-icons/fa6";
24

35
import { TimeInput } from "@/components/time_input";
46
import TimeTag, { DayTag } from "@/components/time_tag";
@@ -233,19 +235,16 @@ export function TaskItem({
233235
</div>
234236
) : (
235237
<button className="hover:brightness-110" onClick={startEdit}>
236-
Edit
238+
<FaRegEdit className="h-5 w-5" />
237239
</button>
238240
)}
239241
</div>
240242

241243
{/* Delete Button */}
242244
<div>
243245
{!isEditing && (
244-
<button
245-
onClick={() => onDelete(item.id)}
246-
className="mt-2 text-red-500"
247-
>
248-
Delete Task
246+
<button onClick={() => onDelete(item.id)}>
247+
<FaRegTrashCan className="h-5 w-5 hover:text-red-600" />
249248
</button>
250249
)}
251250
</div>

client/src/components/time_input.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import { FaRegCalendarAlt,FaRegClock } from "react-icons/fa";
2+
import { FaRegTrashCan } from "react-icons/fa6";
3+
14
interface Time {
25
id: number;
36
day: number;
@@ -31,7 +34,7 @@ export function TimeInput({ times, setTimes }: TimeInputProps) {
3134
className="time-input-wrapper flex w-full flex-row items-center justify-evenly gap-1 rounded-lg bg-slate-400 p-1 brightness-90 hover:brightness-95"
3235
>
3336
<div className="day-select-wrapper flex w-[20%] flex-row items-center justify-center gap-1">
34-
<div className="calendar-placeholder h-5 w-5 bg-slate-200"></div>
37+
<FaRegCalendarAlt />
3538
<select
3639
className="day-select h-full rounded-lg bg-slate-400 p-1 text-center hover:brightness-110"
3740
value={time.day}
@@ -49,7 +52,7 @@ export function TimeInput({ times, setTimes }: TimeInputProps) {
4952
</select>
5053
</div>
5154
<div className="time-select-wrapper flex w-[35%] flex-row items-center justify-center gap-1">
52-
<div className="clock-placeholder h-5 w-5 rounded-full bg-slate-200"></div>
55+
<FaRegClock />
5356
<div className="time-inputs-wrapper text-md flex flex-col">
5457
<input
5558
className="time-input h-full rounded-lg bg-slate-400 hover:brightness-110"
@@ -91,7 +94,7 @@ export function TimeInput({ times, setTimes }: TimeInputProps) {
9194
type="button"
9295
onClick={() => setTimes(times.filter((_, i) => i !== index))}
9396
>
94-
<div className="trashcan-placeholder h-5 w-5 bg-red-500"></div>
97+
<FaRegTrashCan className="hover:text-red-500" />
9598
</button>
9699
</div>
97100
))}

client/src/components/time_tag.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { FaRegCalendarAlt,FaRegClock } from "react-icons/fa";
2+
13
import { getDurationMinutes } from "@/components/timetable";
24

35
/*
@@ -51,7 +53,7 @@ function TimeTag({ start_time, end_time, display }: TimeTagProps) {
5153
);
5254
return (
5355
<div className="flex h-fit w-fit flex-row items-center justify-center gap-1 rounded-full">
54-
<div className="placeholder-clock aspect-1/1 h-5 w-5 rounded-[50] bg-slate-200"></div>
56+
<FaRegClock />
5557
<p className="hover:brightness-110">{time_display_string}</p>
5658
</div>
5759
);
@@ -66,7 +68,7 @@ interface DayTagProps {
6668
export function DayTag({ day }: DayTagProps) {
6769
return (
6870
<div className="flex h-fit w-fit flex-row items-center justify-center gap-1 rounded-full">
69-
<div className="placeholder-calendar aspect-1/1/ h-5 w-5 bg-slate-200"></div>
71+
<FaRegCalendarAlt />
7072
<p className="hover:brightness-110">{day}</p>
7173
</div>
7274
);

client/src/components/topic_input.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { FaRegTrashCan } from "react-icons/fa6";
2+
13
interface Topic {
24
id: number;
35
name: string;
@@ -50,7 +52,7 @@ export function TopicInput({
5052
setTopics(topics.filter((_, i) => i !== index))
5153
}
5254
>
53-
<div className="trashcan-placeholder aspect-square h-5 bg-red-500"></div>
55+
<FaRegTrashCan className="hover:text-red-500" />
5456
</button>
5557
</div>
5658
);
@@ -73,9 +75,9 @@ export function TopicInput({
7375
}}
7476
/>
7577
<input
76-
className="topic-name-input w-[75%] bg-slate-400 text-justify hover:brightness-110"
78+
className="topic-name-input w-[75%] bg-slate-400 text-justify placeholder:text-slate-300 hover:brightness-110"
7779
type="text"
78-
placeholder="New Topic Name"
80+
placeholder="Topic name..."
7981
value={topic.name}
8082
onChange={(e) => {
8183
const newTopics = [...topics];
@@ -89,7 +91,7 @@ export function TopicInput({
8991
type="button"
9092
onClick={() => setTopics(topics.filter((_, i) => i !== index))}
9193
>
92-
<div className="trashcan-placeholder aspect-square h-5 bg-red-500"></div>
94+
<FaRegTrashCan className="hover:text-red-500" />
9395
</button>
9496
</div>
9597
);

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

0 commit comments

Comments
 (0)