Major UI update

This commit is contained in:
Niels Geens
2024-11-06 16:12:50 +01:00
parent 70ed16f8ab
commit 6e78a0f0bd
16 changed files with 594 additions and 358 deletions

View File

@@ -0,0 +1,35 @@
import React from 'react';
import Editor from '@monaco-editor/react';
import { Card, CardContent } from '@/components/ui/card';
import { Alert, AlertDescription } from '@/components/ui/alert';
export const StandardEditor = ({
content,
onChange,
readOnly = false,
language = 'xml',
validationError = null,
}) => (
<Card className="h-[calc(100vh-8rem)]">
<CardContent className="p-0 h-full">
{validationError && (
<Alert variant="destructive" className="m-4">
<AlertDescription>{validationError}</AlertDescription>
</Alert>
)}
<Editor
height="100%"
language={language}
value={content}
onChange={onChange}
options={{
minimap: { enabled: false },
lineNumbers: 'on',
readOnly,
fontSize: 14,
automaticLayout: true,
}}
/>
</CardContent>
</Card>
);