Update checkboxes

This commit is contained in:
2026-02-14 16:40:57 -05:00
parent f224f3fa2c
commit 6c86fdd58b
11 changed files with 33 additions and 99 deletions

View File

@@ -1,10 +1,9 @@
import type { CheckboxProps } from "$/types/InputTypes";
import { Checkbox } from "@headlessui/react";
import clsx from "clsx";
import { forwardRef } from "react";
const MattrixwvCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
export default function MattrixwvCheckbox({
id = crypto.randomUUID().replaceAll("-", ""),
className,
labelClassName,
@@ -18,7 +17,7 @@ const MattrixwvCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
value,
disabled,
children
}, ref ) => {
}: Readonly<CheckboxProps>){
return (
<Checkbox
id={id}
@@ -38,7 +37,6 @@ const MattrixwvCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
value={value}
disabled={disabled}
aria-labelledby={`${id}Label`}
ref={ref}
>
{/* Checkbox */}
<div
@@ -82,8 +80,4 @@ const MattrixwvCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
}
</Checkbox>
);
});
MattrixwvCheckbox.displayName = "MattrixwvCheckbox";
export default MattrixwvCheckbox;
}