mirror of
https://github.com/hanzo-apps/dataroom.git
synced 2026-10-30 14:47:36 +00:00
36 lines
684 B
TypeScript
36 lines
684 B
TypeScript
import { AlertCircleIcon } from "lucide-react";
|
|
|
|
import {
|
|
Alert,
|
|
AlertClose,
|
|
AlertDescription,
|
|
AlertTitle,
|
|
} from "@/components/ui/alert";
|
|
|
|
interface AlertProps {
|
|
id: string;
|
|
variant: "default" | "destructive";
|
|
title: string;
|
|
description: React.ReactNode;
|
|
onClose?: () => void;
|
|
}
|
|
|
|
const AlertBanner: React.FC<AlertProps> = ({
|
|
id,
|
|
variant,
|
|
title,
|
|
description,
|
|
onClose,
|
|
}) => {
|
|
return (
|
|
<Alert id={id} variant={variant}>
|
|
<AlertCircleIcon className="h-4 w-4" />
|
|
<AlertTitle>{title}</AlertTitle>
|
|
<AlertDescription>{description}</AlertDescription>
|
|
<AlertClose onClick={onClose} />
|
|
</Alert>
|
|
);
|
|
};
|
|
|
|
export default AlertBanner;
|