Files
MattrixwvReactComponents/lib/component/input/checkbox/DarkCheckbox.tsx

31 lines
636 B
TypeScript

import type { CheckboxProps } from "$/types/InputTypes";
import clsx from "clsx";
import { forwardRef } from "react";
import MattrixwvCheckbox from "./MattrixwvCheckbox";
const DarkCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
className,
showBox = true,
...props
}, ref) => {
return (
<MattrixwvCheckbox
className={clsx(
className,
{
"group-data-checked:bg-dark group-data-checked:stroke-light": showBox,
"group-data-checked:stroke-dark": !showBox
}
)}
showBox={showBox}
ref={ref}
{...props}
/>
);
});
DarkCheckbox.displayName = "DarkCheckbox";
export default DarkCheckbox;