Components
Loading preview...
Alert in shadcn/ui format
npx shadcn@latest add https://21st.dev/r/serafimcloud/alertimport { Alert, AlertContent, AlertTitle, AlertDescription } from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
import { X } from "lucide-react"
function AlertCookieNotice() {
return (
<Alert
className="min-w-[400px]"
layout="complex"
isNotification
size="lg"
action={
<Button
variant="ghost"
className="group -my-1.5 -me-2 size-8 p-0 hover:bg-transparent"
aria-label="Close notification"
>
<X
size={16}
strokeWidth={2}
className="opacity-60 transition-opacity group-hover:opacity-100"
/>
</Button>
}
>
<AlertContent>
<AlertTitle>We Value Your Privacy 🍪</AlertTitle>
<AlertDescription>
We use cookies to improve your experience, and show personalized content.
</AlertDescription>
<div className="flex gap-2 pt-3">
<Button size="sm">Accept</Button>
<Button size="sm" variant="outline">Decline</Button>
</div>
</AlertContent>
</Alert>
)
}
export { AlertCookieNotice }