diff --git a/app/components/settings/ColorSettings.tsx b/app/components/settings/ColorSettings.tsx
index 4ada123..cc701dc 100644
--- a/app/components/settings/ColorSettings.tsx
+++ b/app/components/settings/ColorSettings.tsx
@@ -1,29 +1,32 @@
- import React from 'react';
+import React from 'react';
- interface ColorSettingProps {
+// Define the props for the ColorSetting component
+interface ColorSettingProps {
name: string; // The name to display in the
tag
value: string; // The current color value
setValue: (newColor: string) => void; // The method to update the state
cssVariable: string; // The CSS variable name to set
- }
+}
- const ColorSetting: React.FC = ({ name, value, setValue, cssVariable }) => {
+// Functional component definition
+const ColorSetting: React.FC = ({ name, value, setValue, cssVariable }) => {
+ // Handler to change the color value
const handleColorChange = (e: React.ChangeEvent) => {
- const newColor = e.target.value;
- setValue(newColor);
- document.documentElement.style.setProperty(cssVariable, newColor);
+ const newColor = e.target.value; // Get the new color from the input
+ setValue(newColor); // Update the state with the new color
+ document.documentElement.style.setProperty(cssVariable, newColor); // Set the CSS variable
};
return (
-