diff --git a/src/components/layout/content.tsx b/src/components/layout/content.tsx index c2023df..a49b643 100644 --- a/src/components/layout/content.tsx +++ b/src/components/layout/content.tsx @@ -11,6 +11,7 @@ import { Heading } from '../ui/heading.tsx' import { LoadingState } from '../ui/loading-state.tsx' import { PageTitle } from '../ui/page-title.tsx' import DragNDrop from '../upload/drag-n-drop.tsx' +import { UploadError } from '../upload/upload-error.tsx' import { UploadStatus } from '../upload/upload-status.tsx' // Completed state for displaying upload history @@ -87,6 +88,10 @@ export default function Content() { {showActiveUpload && uploadedFile && (
Current upload + + {/* Show error alert if upload failed */} + + ['variant']> -export type AlertVariant = keyof typeof variantConfig +type ButtonType = { + children: React.ReactNode + onClick?: React.ComponentProps<'button'>['onClick'] +} type AlertProps = { - variant: AlertVariant + variant?: AlertVariant message: string - button?: { - children: string - onClick: React.ComponentProps<'button'>['onClick'] - } + description?: string + button?: ButtonType + cancelButton?: ButtonType +} + +const ICONS: Record = { + success: CircleCheck, + error: AlertTriangle, + info: Info, + warning: CircleAlert, + neutral: CircleAlert, } -function Alert({ variant, message, button }: AlertProps) { - const { containerClass, textClass, iconClass, buttonClass, Icon } = variantConfig[variant] +export function Alert({ variant = 'neutral', message, description, button, cancelButton }: AlertProps) { + const Icon = ICONS[variant] return ( -
-