Components
Loading preview...
Alert in shadcn/ui format
npx shadcn@latest add https://21st.dev/r/serafimcloud/alertimport { Alert } from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
import { CircleCheck, X } from "lucide-react"
function AlertWithMultipleActions() {
return (
<Alert
layout="row"
isNotification
className="min-w-[400px]"
icon={
<CircleCheck className="text-emerald-500" size={16} strokeWidth={2} />
}
action={
<Button
variant="ghost"
className="group -my-1.5 -me-2 size-8 p-0 hover:bg-transparent"
aria-label="Close banner"
>
<X
size={16}
strokeWidth={2}
className="opacity-60 transition-opacity group-hover:opacity-100"
/>
</Button>
}
>
<div className="flex grow justify-between gap-12">
<p className="text-sm">Message sent</p>
<div className="whitespace-nowrap text-sm">
<button className="text-sm font-medium hover:underline">View</button>
<span className="mx-1 text-muted-foreground">·</span>
<button className="text-sm font-medium hover:underline">Undo</button>
</div>
</div>
</Alert>
)
}
export { AlertWithMultipleActions }