Skip to content

Commit 4365487

Browse files
events in schedule (#446)
Co-authored-by: Prince Kumar <x.prince.x@outlook.com>
1 parent 14236c7 commit 4365487

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/components/Calendar/CalenderComponent/Labels.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ import GlobalContext from "../context/GlobalContext";
33
import { labelsClasses } from "../context/ContextWrapper";
44

55
let colors =
6-
"text-green-400 text-red-400 text-indigo-400 text-gray-400 text-blue-400 text-purple-400";
6+
"text-green-400 text-red-400 text-indigo-400 text-gray-400 text-blue-400 text-purple-400 text-yellow-400";
77
export default function Labels() {
88
const { labels, updateLabel } = useContext(GlobalContext);
99

1010
return (
1111
<React.Fragment>
1212
<p className="text-white font-bold ">Label</p>
13-
{Array.from(labelsClasses.entries()).map(([label, color], idx) => {
13+
{Array.from(labelsClasses.entries()).map(([label, colors], idx) => {
1414
const checked =
1515
labels.find((lbl) => lbl.label === label)?.checked || false;
1616
return (
@@ -19,7 +19,7 @@ export default function Labels() {
1919
type="checkbox"
2020
checked={checked}
2121
onChange={() => updateLabel({ label, checked: !checked })}
22-
className={`form-checkbox h-5 w-5 text-${color}-400 rounded focus:ring-0 cursor-pointer`}
22+
className={`form-checkbox h-5 w-5 text-${colors}-400 rounded focus:ring-0 cursor-pointer`}
2323
/>
2424
<span className="ml-2 text-white font-medium capitalize">
2525
{label}

src/components/Calendar/context/ContextWrapper.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const labelsClasses = new Map([
1616
["COMPLETED", "blue"],
1717
["APPLICATION", "purple"],
1818
["POLL", "gray"],
19+
["EVENTS","yellow"],
1920
]);
2021

2122
function savedEventsReducer(

0 commit comments

Comments
 (0)