From 19a6d435b270dcc285d6b417c0a08579965d8360 Mon Sep 17 00:00:00 2001 From: Sergey Elpashev Date: Tue, 6 May 2025 13:18:03 +0300 Subject: [PATCH] hotfix: icon classname in checkbox --- src/pages/profile_tasks.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pages/profile_tasks.tsx b/src/pages/profile_tasks.tsx index cec3075..4009b70 100644 --- a/src/pages/profile_tasks.tsx +++ b/src/pages/profile_tasks.tsx @@ -24,7 +24,7 @@ import { } from "@heroicons/react/24/outline"; import { FunctionComponent } from "preact"; import { useEffect, useMemo, useRef, useState } from "preact/hooks"; -import { Checkbox } from "primereact/checkbox"; +import { Checkbox, CheckboxPassThroughMethodOptions } from "primereact/checkbox"; import { Nullable } from "primereact/ts-helpers"; import { SubmitHandler, useForm } from "react-hook-form"; import { v4 as uuid } from "uuid"; @@ -665,7 +665,7 @@ const ProfileTasks: FunctionComponent = () => { "absolute appearance-none top-0 left-0 size-full p-0 m-0 opacity-0 z-10 outline-none cursor-pointer" ), }, - box: ({ props, context }) => ({ + box: ({ props, context }: CheckboxPassThroughMethodOptions) => ({ className: cn( "flex items-center justify-center", "border-2 w-6 h-6 text-gray-600 rounded-lg transition-colors duration-200", @@ -680,7 +680,9 @@ const ProfileTasks: FunctionComponent = () => { } ), }), - icon: "w-4 h-4 transition-all duration-200 text-white text-base", + icon: { + className: "w-4 h-4 transition-all duration-200 text-white text-base", + }, }} >