feat: update blog posts and improve cookie consent management
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
'use client';
|
||||
|
||||
import { Cookie } from 'lucide-react';
|
||||
import { useConsentStore } from '@/lib/consent-store';
|
||||
|
||||
export function CookieSettingsFloatingIcon() {
|
||||
const { isInitialized, isOpen, openBanner } = useConsentStore();
|
||||
|
||||
// Only show if initialized (user has made a decision or default exists) and the banner is closed
|
||||
if (!isInitialized || isOpen) return null;
|
||||
|
||||
return (
|
||||
<button
|
||||
onClick={openBanner}
|
||||
className="fixed bottom-24 sm:bottom-6 left-4 sm:left-6 z-[90] flex size-12 items-center justify-center rounded-full bg-white text-primary shadow-xl border border-border hover:bg-slate-50 transition-all duration-300 group focus:outline-none focus:ring-2 focus:ring-accent focus:ring-offset-2"
|
||||
aria-label="Ustawienia ciasteczek"
|
||||
title="Zarządzaj plikami cookies"
|
||||
>
|
||||
<Cookie className="size-5 text-slate-500 group-hover:text-accent transition-colors" />
|
||||
</button>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user