From c8a8ffaf0a2dc77f6c13662589018461de7996e3 Mon Sep 17 00:00:00 2001 From: sageTheDM Date: Fri, 11 Oct 2024 09:27:48 +0200 Subject: [PATCH] CheckBox comments --- app/components/settings/CheckBox.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/components/settings/CheckBox.tsx b/app/components/settings/CheckBox.tsx index 1b1ece5..7944a7e 100644 --- a/app/components/settings/CheckBox.tsx +++ b/app/components/settings/CheckBox.tsx @@ -1,25 +1,28 @@ import React from 'react'; +// Define the props for the CheckboxSetting component interface CheckboxSettingProps { label: string; // The label to display checked: boolean; // The checked state of the checkbox setChecked: (value: boolean) => void; // Method to update the state } +// Functional component definition const CheckboxSetting: React.FC = ({ label, checked, setChecked }) => { + // Handler to toggle the checkbox state const handleCheckboxChange = () => { - setChecked(!checked); + setChecked(!checked); // Toggle the checked state }; return ( -
+
{/* Container for the checkbox setting */}
);