mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 13:00:39 +03:00
31 lines
736 B
TypeScript
31 lines
736 B
TypeScript
![]() |
import Modal from '../../components/Common/Modal';
|
||
|
import PrettyJson from '../../components/Common/PrettyJSON';
|
||
|
import { SyntaxTree } from '../../utils/models';
|
||
|
|
||
|
interface DlgShowASTProps {
|
||
|
hideWindow: () => void
|
||
|
syntaxTree: SyntaxTree
|
||
|
}
|
||
|
|
||
|
function DlgShowAST({ hideWindow, syntaxTree }: DlgShowASTProps) {
|
||
|
const handleSubmit = () => {
|
||
|
// Do nothing
|
||
|
};
|
||
|
|
||
|
return (
|
||
|
<Modal
|
||
|
title='Просмотр дерева разбора'
|
||
|
hideWindow={hideWindow}
|
||
|
onSubmit={handleSubmit}
|
||
|
submitText='Закрыть'
|
||
|
canSubmit={true}
|
||
|
>
|
||
|
<div className='max-w-[40rem] max-h-[30rem] overflow-auto'>
|
||
|
<PrettyJson data={syntaxTree}/>
|
||
|
</div>
|
||
|
</Modal>
|
||
|
);
|
||
|
}
|
||
|
|
||
|
export default DlgShowAST;
|