initial commit
This commit is contained in:
commit
2e0cbc254c
174 changed files with 27742 additions and 0 deletions
24
resources/js/components/alert-error.tsx
Normal file
24
resources/js/components/alert-error.tsx
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';
|
||||
import { AlertCircleIcon } from 'lucide-react';
|
||||
|
||||
export default function AlertError({
|
||||
errors,
|
||||
title,
|
||||
}: {
|
||||
errors: string[];
|
||||
title?: string;
|
||||
}) {
|
||||
return (
|
||||
<Alert variant="destructive">
|
||||
<AlertCircleIcon />
|
||||
<AlertTitle>{title || 'Something went wrong.'}</AlertTitle>
|
||||
<AlertDescription>
|
||||
<ul className="list-inside list-disc text-sm">
|
||||
{Array.from(new Set(errors)).map((error, index) => (
|
||||
<li key={index}>{error}</li>
|
||||
))}
|
||||
</ul>
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue