fix combobox-advanced

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-08-11 23:33:47 +02:00
parent c82247143c
commit 9fcc31319d
2 changed files with 18 additions and 3 deletions

View File

@@ -5,6 +5,21 @@ import { cn } from '@/utils/cn';
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
import { Check } from 'lucide-react';
export const DumpCheckbox = ({ checked }: { checked: boolean }) => {
return (
<div
className={cn(
'block h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
checked && 'bg-primary text-primary-foreground'
)}
>
<div className="flex items-center justify-center text-current">
{checked && <Check className="h-4 w-4" />}
</div>
</div>
);
};
const Checkbox = React.forwardRef<
React.ElementRef<typeof CheckboxPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>