import type * as React from 'react' import { CircleAlert, LoaderCircle, Plus } from 'lucide-react' import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert' import { Button } from '@/components/ui/button' import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from '@/components/ui/dialog' import { cn } from '@/lib/utils' type AppCreateDialogProps = { open: boolean onOpenChange: (open: boolean) => void title: string description: string submitLabel: string onSubmit: React.FormEventHandler children: React.ReactNode pending?: boolean submitDisabled?: boolean error?: string className?: string bodyClassName?: string } export function AppCreateDialog({ open, onOpenChange, title, description, submitLabel, onSubmit, children, pending = false, submitDisabled = false, error, className, bodyClassName }: AppCreateDialogProps) { return (
{title} {description}
{children} {error ? ( 创建未完成 {error} ) : null}
) }