Spaces:
Sleeping

BaseAdmin / src /components /ui /checkbox.jsx
guisousa's picture
Update src/components/ui/checkbox.jsx
8be9aff verified
Raw History Blame Contribute Delete
449 Bytes
import React from "react";
export const Checkbox = React.forwardRef(({ className = "", checked, onCheckedChange, ...props }, ref) => {
return (
<input
type="checkbox"
ref={ref}
className={`w-4 h-4 rounded border outline-none accent-black ${className}`}
checked={!!checked}
onChange={(e) => onCheckedChange && onCheckedChange(e.target.checked)}
{...props}
/>
);
});
Checkbox.displayName = "Checkbox";