Update checkboxes

This commit is contained in:
2026-02-11 22:18:32 -05:00
parent ac042d0a4f
commit c4f1ccd869
13 changed files with 92 additions and 84 deletions

View File

@@ -10,33 +10,42 @@ const MattrixwvCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
labelClassName,
name,
size = "sm",
box = true,
showBox = true,
onChange,
checked,
defaultChecked,
strokeWidth = 2,
value,
disabled,
ariaLabel,
children
}, ref ) => {
return (
<Checkbox
id={id}
className={clsx(
"group cursor-pointer",
"flex flex-row items-center justify-center gap-x-2"
"group",
"flex flex-row items-center justify-start gap-x-2",
{
"cursor-pointer": !disabled,
"cursor-not-allowed": disabled
}
)}
name={name}
checked={checked}
defaultChecked={defaultChecked}
onChange={onChange}
value={value}
disabled={disabled}
aria-label={ariaLabel}
ref={ref}
>
{/* Checkbox */}
<div
className={clsx(
className,
{
"rounded border": box
"border rounded": showBox
},
{
"": size === "none",
@@ -51,7 +60,7 @@ const MattrixwvCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
<svg
viewBox="0 0 14 14"
fill="none"
aria-label="checkbox"
aria-hidden="true"
>
<path
d="M3 8L6 11L11 3.5"
@@ -61,6 +70,7 @@ const MattrixwvCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
/>
</svg>
</div>
{/* Label */}
{
children &&
<div