import MinusIcon from "./icons/MinusIcon";
import SelectedCheckboxIcon from "./icons/SelectedCheckboxIcon";
import { ICheckbox } from "../types/checkbox";
interface CheckboxProps {
onClick: (id: string) => void;
checkbox: ICheckbox;
}
const Checkbox = ({ onClick, checkbox }: CheckboxProps) => {
return (
onClick(checkbox.id)}
className={`flex justify-between bg-white p-3 rounded-lg transition-[background] duration-300 ease-in-out select-none ${
checkbox.disabled
? "pointer-events-none touch-none"
: "hover:bg-[#F3F3F2] cursor-pointer"
}`}
>
{checkbox.disabled ? (
) : (
{checkbox.selected ? : <>>}
)}
{checkbox.title}
{!checkbox.disabled ? (
) : (
)}
);
};
export default Checkbox;