import { Button, Dialog, DialogContent, DialogTitle, FormControlLabel, TextField } from '@mui/material'; import { useState } from 'react'; import { useMetaStore } from './MetaForm'; export const DialogKey = ({ onAdd }: { onAdd: (key: string) => void }) => { const { openPropertyModal, setOpenPropertyModal } = useMetaStore(); const [key, setKey] = useState(''); return ( setOpenPropertyModal(false)}> 添加元数据key
setKey(e.target.value)} />} sx={{ alignItems: 'flex-start', '& .MuiFormControlLabel-label': { textAlign: 'left', width: '100%', }, }} />
); };