File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ const CustomToggle = ({
99 label,
1010 disabled,
1111 colorTheme = 'rose' ,
12+ fontClass = '' ,
13+ labelColorClass = 'text-gray-300' ,
14+ hoverColorClass = 'group-hover:text-white' ,
1215} ) => {
1316 const themes = {
1417 rose : {
@@ -52,12 +55,12 @@ const CustomToggle = ({
5255
5356 return (
5457 < div
55- className = { `flex items-center justify-between w-full group py-2 ${ disabled ? 'opacity-50 cursor-not-allowed' : 'cursor-pointer' } ` }
58+ className = { `flex items-center justify-between w-full group py-2 gap-4 ${ disabled ? 'opacity-50 cursor-not-allowed' : 'cursor-pointer' } ` }
5659 onClick = { ( ) => ! disabled && onChange ( { target : { checked : ! checked } } ) }
5760 >
5861 < label
5962 htmlFor = { id }
60- className = " text-base sm:text-lg text-gray-300 font-medium cursor-pointer select-none group-hover:text-white transition-colors duration-300"
63+ className = { ` text-base sm:text-lg font-medium cursor-pointer select-none transition-colors duration-300 ${ labelColorClass } ${ hoverColorClass } ${ fontClass } ` }
6164 onClick = { ( e ) => e . stopPropagation ( ) } // Prevent double toggle if label is clicked directly (though container click handles it)
6265 >
6366 { label }
You can’t perform that action at this time.
0 commit comments