Added type into new Global input component

This commit is contained in:
Lucas Oliveira 2024-03-22 17:48:19 +01:00
commit 7aa3c5f494
2 changed files with 11 additions and 1 deletions

View file

@ -9,6 +9,7 @@ import AddNewVariableButton from "../addNewVariableButtonComponent/addNewVariabl
import ForwardedIconComponent from "../genericIconComponent";
import InputComponent from "../inputComponent";
import { CommandItem } from "../ui/command";
import { InputGlobalComponentType } from "../../types/components";
export default function InputGlobalComponent({
disabled,
@ -16,7 +17,7 @@ export default function InputGlobalComponent({
setDb,
name,
data,
}) {
}: InputGlobalComponentType): JSX.Element {
const globalVariablesEntries = useGlobalVariablesStore(
(state) => state.globalVariablesEntries
);

View file

@ -71,6 +71,15 @@ export type InputListComponentType = {
editNode?: boolean;
};
export type InputGlobalComponentType =
{
disabled: boolean,
onChange: (value: string) => void,
setDb: (value: boolean) => void,
name: string,
data: NodeDataType,
};
export type KeyPairListComponentType = {
value: any;
onChange: (value: Object[]) => void;