Add CookieBanner component with useCookieConsent hook, translations in EN/PL, and integration into root layout Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
30 lines
709 B
TypeScript
30 lines
709 B
TypeScript
import { cn } from "@/lib/utils";
|
|
|
|
interface CheckboxProps {
|
|
checked?: boolean;
|
|
disabled?: boolean;
|
|
onCheckedChange?: (checked: boolean) => void;
|
|
id?: string;
|
|
}
|
|
|
|
export function Checkbox({
|
|
checked,
|
|
disabled,
|
|
onCheckedChange,
|
|
id,
|
|
}: CheckboxProps) {
|
|
return (
|
|
<input
|
|
id={id}
|
|
type="checkbox"
|
|
checked={checked}
|
|
disabled={disabled}
|
|
onChange={(e) => onCheckedChange?.(e.target.checked)}
|
|
className={cn(
|
|
"h-4 w-4 shrink-0 cursor-pointer rounded-sm border border-primary",
|
|
"accent-primary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
)}
|
|
/>
|
|
);
|
|
}
|