Update checkboxes
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user