hotfix: icon classname in checkbox

This commit is contained in:
2025-05-06 13:18:03 +03:00
parent 5b5082df38
commit 19a6d435b2

View File

@@ -24,7 +24,7 @@ import {
} from "@heroicons/react/24/outline"; } from "@heroicons/react/24/outline";
import { FunctionComponent } from "preact"; import { FunctionComponent } from "preact";
import { useEffect, useMemo, useRef, useState } from "preact/hooks"; 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 { Nullable } from "primereact/ts-helpers";
import { SubmitHandler, useForm } from "react-hook-form"; import { SubmitHandler, useForm } from "react-hook-form";
import { v4 as uuid } from "uuid"; 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" "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( className: cn(
"flex items-center justify-center", "flex items-center justify-center",
"border-2 w-6 h-6 text-gray-600 rounded-lg transition-colors duration-200", "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",
},
}} }}
></Checkbox> ></Checkbox>
<label htmlFor="overdue" class="cursor-pointer"> <label htmlFor="overdue" class="cursor-pointer">