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,14 +1,13 @@
import type { CheckboxProps } from "$/types/InputTypes";
import clsx from "clsx";
import { forwardRef } from "react";
import MattrixwvCheckbox from "./MattrixwvCheckbox";
const DangerCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
export default function DangerCheckbox({
className,
showBox = true,
...props
}, ref) => {
}: Readonly<CheckboxProps>){
return (
<MattrixwvCheckbox
className={clsx(
@@ -19,12 +18,7 @@ const DangerCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
}
)}
showBox={showBox}
ref={ref}
{...props}
/>
);
});
DangerCheckbox.displayName = "DangerCheckbox";
export default DangerCheckbox;
}

View File

@@ -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<HTMLInputElement, CheckboxProps>(({
export default function DarkCheckbox({
className,
showBox = true,
...props
}, ref) => {
}: Readonly<CheckboxProps>){
return (
<MattrixwvCheckbox
className={clsx(
@@ -19,12 +18,7 @@ const DarkCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
}
)}
showBox={showBox}
ref={ref}
{...props}
/>
);
});
DarkCheckbox.displayName = "DarkCheckbox";
export default DarkCheckbox;
}

View File

@@ -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<HTMLInputElement, CheckboxProps>(({
export default function InfoCheckbox({
className,
showBox = true,
...props
}, ref) => {
}: Readonly<CheckboxProps>){
return (
<MattrixwvCheckbox
className={clsx(
@@ -19,12 +18,7 @@ const InfoCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
}
)}
showBox={showBox}
ref={ref}
{...props}
/>
);
});
InfoCheckbox.displayName = "InfoCheckbox";
export default InfoCheckbox;
}

View File

@@ -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<HTMLInputElement, CheckboxProps>(({
export default function LightCheckbox({
className,
showBox = true,
...props
}, ref) => {
}: Readonly<CheckboxProps>){
return (
<MattrixwvCheckbox
className={clsx(
@@ -19,12 +18,7 @@ const LightCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
}
)}
showBox={showBox}
ref={ref}
{...props}
/>
);
});
LightCheckbox.displayName = "LightCheckbox";
export default LightCheckbox;
}

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;
}

View File

@@ -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<HTMLInputElement, CheckboxProps>(({
export default function MoltenCheckbox({
className,
showBox = true,
...props
}, ref) => {
}: Readonly<CheckboxProps>){
return (
<MattrixwvCheckbox
className={clsx(
@@ -19,12 +18,7 @@ const MoltenCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
}
)}
showBox={showBox}
ref={ref}
{...props}
/>
);
});
MoltenCheckbox.displayName = "MoltenCheckbox";
export default MoltenCheckbox;
}

View File

@@ -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<HTMLInputElement, CheckboxProps>(({
export default function PrimaryCheckbox({
className,
showBox = true,
...props
}, ref) => {
}: Readonly<CheckboxProps>){
return (
<MattrixwvCheckbox
className={clsx(
@@ -19,12 +18,7 @@ const PrimaryCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
}
)}
showBox={showBox}
ref={ref}
{...props}
/>
);
});
PrimaryCheckbox.displayName = "PrimaryCheckbox";
export default PrimaryCheckbox;
}

View File

@@ -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<HTMLInputElement, CheckboxProps>(({
export default function SecondaryCheckbox({
className,
showBox = true,
...props
}, ref) => {
}: Readonly<CheckboxProps>){
return (
<MattrixwvCheckbox
className={clsx(
@@ -19,12 +18,7 @@ const SecondaryCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
}
)}
showBox={showBox}
ref={ref}
{...props}
/>
);
});
SecondaryCheckbox.displayName = "SecondaryCheckbox";
export default SecondaryCheckbox;
}

View File

@@ -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<HTMLInputElement, CheckboxProps>(({
export default function SuccessCheckbox({
className,
showBox = true,
...props
}, ref) => {
}: Readonly<CheckboxProps>){
return (
<MattrixwvCheckbox
className={clsx(
@@ -19,12 +18,7 @@ const SuccessCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
}
)}
showBox={showBox}
ref={ref}
{...props}
/>
);
});
SuccessCheckbox.displayName = "SuccessCheckbox";
export default SuccessCheckbox;
}

View File

@@ -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<HTMLInputElement, CheckboxProps>(({
export default function TertiaryCheckbox({
className,
showBox = true,
...props
}, ref) => {
}: Readonly<CheckboxProps>){
return (
<MattrixwvCheckbox
className={clsx(
@@ -19,12 +18,7 @@ const TertiaryCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
}
)}
showBox={showBox}
ref={ref}
{...props}
/>
);
});
TertiaryCheckbox.displayName = "TertiaryCheckbox";
export default TertiaryCheckbox;
}

View File

@@ -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<HTMLInputElement, CheckboxProps>(({
export default function WarningCheckbox({
className,
showBox = true,
...props
}, ref) => {
}: Readonly<CheckboxProps>){
return (
<MattrixwvCheckbox
className={clsx(
@@ -19,12 +18,7 @@ const WarningCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
}
)}
showBox={showBox}
ref={ref}
{...props}
/>
);
});
WarningCheckbox.displayName = "WarningCheckbox";
export default WarningCheckbox;
}