Add components for Act management and integrate Electron setup

This commit is contained in:
natreex
2025-11-16 11:00:04 -05:00
parent e192b6dcc2
commit 8167948881
97 changed files with 25378 additions and 3 deletions

View File

@@ -0,0 +1,53 @@
import React, {Dispatch, SetStateAction} from "react";
interface CheckBoxProps {
isChecked: boolean;
setIsChecked: Dispatch<SetStateAction<boolean>>;
label: string;
description: string;
id: string;
}
export default function CheckBox(
{
isChecked,
setIsChecked,
label,
description,
id,
}: CheckBoxProps) {
return (
<div className="flex items-center group">
<div className="relative inline-block w-12 mr-3 align-middle select-none">
<input
type="checkbox"
id={id}
checked={isChecked}
onChange={() => setIsChecked(!isChecked)}
className="hidden"
/>
<label htmlFor={id}
className={`block overflow-hidden h-6 rounded-full cursor-pointer transition-all duration-200 border-2 shadow-sm hover:shadow-md ${
isChecked
? 'bg-primary border-primary shadow-primary/30'
: 'bg-secondary/50 border-secondary hover:bg-secondary'
}`}
>
<span
className={`absolute block h-5 w-5 rounded-full bg-white shadow-md transform transition-all duration-200 top-0.5 ${
isChecked ? 'right-0.5 scale-110' : 'left-0.5'
}`}/>
</label>
</div>
<div className="flex-1">
<label htmlFor={id}
className="text-text-primary text-sm font-medium cursor-pointer group-hover:text-primary transition-colors">
{label}
</label>
<p className="text-text-secondary text-xs mt-0.5 hidden md:block">
{description}
</p>
</div>
</div>
)
}