Add editor lang

This commit is contained in:
Виталий Лавшонок
2025-10-27 13:24:01 +03:00
parent 8fa48ef67e
commit 1690169d5a
6 changed files with 59 additions and 21 deletions

View File

@@ -10,6 +10,8 @@ const languageMap: Record<string, string> = {
java: "java",
python: "python",
pascal: "pascal",
kotlin: "kotlin",
csharp: "csharp"
};
const CodeEditor: React.FC = () => {
@@ -22,8 +24,10 @@ const CodeEditor: React.FC = () => {
{ value: "c", text: "C" },
{ value: "cpp", text: "C++" },
{ value: "java", text: "Java" },
{ value: "python", text: "Python" },
{ value: "python", text: "Python" },
{ value: "pascal", text: "Pascal" },
{ value: "kotlin", text: "Kotlin" },
{ value: "csharp", text: "C#" },
];
const handleFileUpload = (e: React.ChangeEvent<HTMLInputElement>) => {
@@ -70,7 +74,7 @@ const CodeEditor: React.FC = () => {
return (
<div className="flex flex-col w-full h-full">
{/* Панель выбора языка и загрузки файла */}
<div className="flex items-center justify-between p-3 ">
<div className="flex items-center justify-between py-3 ">
<div className="flex items-center gap-[20px]">
<DropDownList items={items} onChange={(v) => { setLanguage(v) }} />