import { X } from 'lucide-react'; import type { ReactNode } from 'react'; import type { CustomWorldCreatorIntent, CustomWorldGenerationMode, } from '../types'; type BaseModalProps = { isOpen: boolean; title: string; onClose: () => void; children: ReactNode; footer?: ReactNode; }; function SelectionModal({ isOpen, title, onClose, children, footer = null, }: BaseModalProps) { if (!isOpen) return null; return (
{title}
{children}
{footer ? (
{footer}
) : null}
); } export function CharacterDraftModal(props: { isOpen: boolean; characterLabel: string; draftName: string; draftBackstory: string; onNameChange: (value: string) => void; onBackstoryChange: (value: string) => void; onClose: () => void; onConfirm: () => void; error?: string | null; }) { const { isOpen, characterLabel, draftName, draftBackstory, onNameChange, onBackstoryChange, onClose, onConfirm, error = null, } = props; return ( )} >
当前角色:{characterLabel}