Radio Button and Checkbox Created

This commit is contained in:
2025-07-30 23:10:17 -04:00
parent cb8c2c23be
commit f6f77c9d42
29 changed files with 892 additions and 18 deletions

View File

@@ -0,0 +1,35 @@
import type { RadioListProps } from "$/types/Input";
import { RadioGroup } from "@headlessui/react";
import clsx from "clsx";
export default function RadioList({
id,
className,
name,
value,
onChange,
defaultValue,
direction = "horizontal",
children
}: RadioListProps){
return (
<RadioGroup
id={id}
className={clsx(
"flex items-center justify-center",
className,
{
"flex-row gap-x-8": direction === "horizontal",
"flex-col gap-y-2": direction === "vertical"
}
)}
name={name}
value={value}
onChange={onChange}
defaultValue={defaultValue}
>
{children}
</RadioGroup>
);
}