diff --git a/lib/component/input/checkbox/DangerCheckbox.tsx b/lib/component/input/checkbox/DangerCheckbox.tsx index 8fbaa03..0e7020a 100644 --- a/lib/component/input/checkbox/DangerCheckbox.tsx +++ b/lib/component/input/checkbox/DangerCheckbox.tsx @@ -1,14 +1,13 @@ import type { CheckboxProps } from "$/types/InputTypes"; import clsx from "clsx"; -import { forwardRef } from "react"; import MattrixwvCheckbox from "./MattrixwvCheckbox"; -const DangerCheckbox = forwardRef(({ +export default function DangerCheckbox({ className, showBox = true, ...props -}, ref) => { +}: Readonly){ return ( (({ } )} showBox={showBox} - ref={ref} {...props} /> ); -}); - -DangerCheckbox.displayName = "DangerCheckbox"; - -export default DangerCheckbox; +} diff --git a/lib/component/input/checkbox/DarkCheckbox.tsx b/lib/component/input/checkbox/DarkCheckbox.tsx index 3e5ea7d..e4a747a 100644 --- a/lib/component/input/checkbox/DarkCheckbox.tsx +++ b/lib/component/input/checkbox/DarkCheckbox.tsx @@ -1,14 +1,13 @@ import type { CheckboxProps } from "$/types/InputTypes"; import clsx from "clsx"; -import { forwardRef } from "react"; import MattrixwvCheckbox from "./MattrixwvCheckbox"; -const DarkCheckbox = forwardRef(({ +export default function DarkCheckbox({ className, showBox = true, ...props -}, ref) => { +}: Readonly){ return ( (({ } )} showBox={showBox} - ref={ref} {...props} /> ); -}); - -DarkCheckbox.displayName = "DarkCheckbox"; - -export default DarkCheckbox; +} diff --git a/lib/component/input/checkbox/InfoCheckbox.tsx b/lib/component/input/checkbox/InfoCheckbox.tsx index b939674..7c1e3ea 100644 --- a/lib/component/input/checkbox/InfoCheckbox.tsx +++ b/lib/component/input/checkbox/InfoCheckbox.tsx @@ -1,14 +1,13 @@ import type { CheckboxProps } from "$/types/InputTypes"; import clsx from "clsx"; -import { forwardRef } from "react"; import MattrixwvCheckbox from "./MattrixwvCheckbox"; -const InfoCheckbox = forwardRef(({ +export default function InfoCheckbox({ className, showBox = true, ...props -}, ref) => { +}: Readonly){ return ( (({ } )} showBox={showBox} - ref={ref} {...props} /> ); -}); - -InfoCheckbox.displayName = "InfoCheckbox"; - -export default InfoCheckbox; +} diff --git a/lib/component/input/checkbox/LightCheckbox.tsx b/lib/component/input/checkbox/LightCheckbox.tsx index 55f9d9d..26ab564 100644 --- a/lib/component/input/checkbox/LightCheckbox.tsx +++ b/lib/component/input/checkbox/LightCheckbox.tsx @@ -1,14 +1,13 @@ import type { CheckboxProps } from "$/types/InputTypes"; import clsx from "clsx"; -import { forwardRef } from "react"; import MattrixwvCheckbox from "./MattrixwvCheckbox"; -const LightCheckbox = forwardRef(({ +export default function LightCheckbox({ className, showBox = true, ...props -}, ref) => { +}: Readonly){ return ( (({ } )} showBox={showBox} - ref={ref} {...props} /> ); -}); - -LightCheckbox.displayName = "LightCheckbox"; - -export default LightCheckbox; +} diff --git a/lib/component/input/checkbox/MattrixwvCheckbox.tsx b/lib/component/input/checkbox/MattrixwvCheckbox.tsx index 22899a6..0317334 100644 --- a/lib/component/input/checkbox/MattrixwvCheckbox.tsx +++ b/lib/component/input/checkbox/MattrixwvCheckbox.tsx @@ -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(({ +export default function MattrixwvCheckbox({ id = crypto.randomUUID().replaceAll("-", ""), className, labelClassName, @@ -18,7 +17,7 @@ const MattrixwvCheckbox = forwardRef(({ value, disabled, children -}, ref ) => { +}: Readonly){ return ( (({ value={value} disabled={disabled} aria-labelledby={`${id}Label`} - ref={ref} > {/* Checkbox */}
(({ } ); -}); - -MattrixwvCheckbox.displayName = "MattrixwvCheckbox"; - -export default MattrixwvCheckbox; +} diff --git a/lib/component/input/checkbox/MoltenCheckbox.tsx b/lib/component/input/checkbox/MoltenCheckbox.tsx index 54d8442..c3d1001 100644 --- a/lib/component/input/checkbox/MoltenCheckbox.tsx +++ b/lib/component/input/checkbox/MoltenCheckbox.tsx @@ -1,14 +1,13 @@ import type { CheckboxProps } from "$/types/InputTypes"; import clsx from "clsx"; -import { forwardRef } from "react"; import MattrixwvCheckbox from "./MattrixwvCheckbox"; -const MoltenCheckbox = forwardRef(({ +export default function MoltenCheckbox({ className, showBox = true, ...props -}, ref) => { +}: Readonly){ return ( (({ } )} showBox={showBox} - ref={ref} {...props} /> ); -}); - -MoltenCheckbox.displayName = "MoltenCheckbox"; - -export default MoltenCheckbox; +} diff --git a/lib/component/input/checkbox/PrimaryCheckbox.tsx b/lib/component/input/checkbox/PrimaryCheckbox.tsx index b08170e..40e9af4 100644 --- a/lib/component/input/checkbox/PrimaryCheckbox.tsx +++ b/lib/component/input/checkbox/PrimaryCheckbox.tsx @@ -1,14 +1,13 @@ import type { CheckboxProps } from "$/types/InputTypes"; import clsx from "clsx"; -import { forwardRef } from "react"; import MattrixwvCheckbox from "./MattrixwvCheckbox"; -const PrimaryCheckbox = forwardRef(({ +export default function PrimaryCheckbox({ className, showBox = true, ...props -}, ref) => { +}: Readonly){ return ( (({ } )} showBox={showBox} - ref={ref} {...props} /> ); -}); - -PrimaryCheckbox.displayName = "PrimaryCheckbox"; - -export default PrimaryCheckbox; +} diff --git a/lib/component/input/checkbox/SecondaryCheckbox.tsx b/lib/component/input/checkbox/SecondaryCheckbox.tsx index a408685..ecbdce1 100644 --- a/lib/component/input/checkbox/SecondaryCheckbox.tsx +++ b/lib/component/input/checkbox/SecondaryCheckbox.tsx @@ -1,14 +1,13 @@ import type { CheckboxProps } from "$/types/InputTypes"; import clsx from "clsx"; -import { forwardRef } from "react"; import MattrixwvCheckbox from "./MattrixwvCheckbox"; -const SecondaryCheckbox = forwardRef(({ +export default function SecondaryCheckbox({ className, showBox = true, ...props -}, ref) => { +}: Readonly){ return ( (({ } )} showBox={showBox} - ref={ref} {...props} /> ); -}); - -SecondaryCheckbox.displayName = "SecondaryCheckbox"; - -export default SecondaryCheckbox; +} diff --git a/lib/component/input/checkbox/SuccessCheckbox.tsx b/lib/component/input/checkbox/SuccessCheckbox.tsx index 3a8d854..40f3a1e 100644 --- a/lib/component/input/checkbox/SuccessCheckbox.tsx +++ b/lib/component/input/checkbox/SuccessCheckbox.tsx @@ -1,14 +1,13 @@ import type { CheckboxProps } from "$/types/InputTypes"; import clsx from "clsx"; -import { forwardRef } from "react"; import MattrixwvCheckbox from "./MattrixwvCheckbox"; -const SuccessCheckbox = forwardRef(({ +export default function SuccessCheckbox({ className, showBox = true, ...props -}, ref) => { +}: Readonly){ return ( (({ } )} showBox={showBox} - ref={ref} {...props} /> ); -}); - -SuccessCheckbox.displayName = "SuccessCheckbox"; - -export default SuccessCheckbox; +} diff --git a/lib/component/input/checkbox/TertiaryCheckbox.tsx b/lib/component/input/checkbox/TertiaryCheckbox.tsx index 391e27a..c4d9edf 100644 --- a/lib/component/input/checkbox/TertiaryCheckbox.tsx +++ b/lib/component/input/checkbox/TertiaryCheckbox.tsx @@ -1,14 +1,13 @@ import type { CheckboxProps } from "$/types/InputTypes"; import clsx from "clsx"; -import { forwardRef } from "react"; import MattrixwvCheckbox from "./MattrixwvCheckbox"; -const TertiaryCheckbox = forwardRef(({ +export default function TertiaryCheckbox({ className, showBox = true, ...props -}, ref) => { +}: Readonly){ return ( (({ } )} showBox={showBox} - ref={ref} {...props} /> ); -}); - -TertiaryCheckbox.displayName = "TertiaryCheckbox"; - -export default TertiaryCheckbox; +} diff --git a/lib/component/input/checkbox/WarningCheckbox.tsx b/lib/component/input/checkbox/WarningCheckbox.tsx index 89071b2..3d0df6c 100644 --- a/lib/component/input/checkbox/WarningCheckbox.tsx +++ b/lib/component/input/checkbox/WarningCheckbox.tsx @@ -1,14 +1,13 @@ import type { CheckboxProps } from "$/types/InputTypes"; import clsx from "clsx"; -import { forwardRef } from "react"; import MattrixwvCheckbox from "./MattrixwvCheckbox"; -const WarningCheckbox = forwardRef(({ +export default function WarningCheckbox({ className, showBox = true, ...props -}, ref) => { +}: Readonly){ return ( (({ } )} showBox={showBox} - ref={ref} {...props} /> ); -}); - -WarningCheckbox.displayName = "WarningCheckbox"; - -export default WarningCheckbox; +}