refacto react component

This commit is contained in:
Matthieu
2025-08-11 22:30:36 +02:00
parent 43ee493f9e
commit 160aea6128
10 changed files with 42 additions and 43 deletions

View File

@@ -1,4 +1,3 @@
import React from 'react';
import { Plus, Trash2 } from 'lucide-react';
import type { NPCConfiguration, MoLangConfigVariable } from '../types/npc';
@@ -7,7 +6,7 @@ interface ConfigVariablesEditorProps {
onChange: (config: NPCConfiguration) => void;
}
export const ConfigVariablesEditor: React.FC<ConfigVariablesEditorProps> = ({ config, onChange }) => {
export function ConfigVariablesEditor({ config, onChange }: ConfigVariablesEditorProps) {
const addVariable = () => {
const newVariable: MoLangConfigVariable = {
variableName: '',
@@ -166,4 +165,4 @@ export const ConfigVariablesEditor: React.FC<ConfigVariablesEditorProps> = ({ co
)}
</div>
);
};
}