Added type into new Global input component
This commit is contained in:
parent
fe2f30d5c5
commit
7aa3c5f494
2 changed files with 11 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ import AddNewVariableButton from "../addNewVariableButtonComponent/addNewVariabl
|
||||||
import ForwardedIconComponent from "../genericIconComponent";
|
import ForwardedIconComponent from "../genericIconComponent";
|
||||||
import InputComponent from "../inputComponent";
|
import InputComponent from "../inputComponent";
|
||||||
import { CommandItem } from "../ui/command";
|
import { CommandItem } from "../ui/command";
|
||||||
|
import { InputGlobalComponentType } from "../../types/components";
|
||||||
|
|
||||||
export default function InputGlobalComponent({
|
export default function InputGlobalComponent({
|
||||||
disabled,
|
disabled,
|
||||||
|
|
@ -16,7 +17,7 @@ export default function InputGlobalComponent({
|
||||||
setDb,
|
setDb,
|
||||||
name,
|
name,
|
||||||
data,
|
data,
|
||||||
}) {
|
}: InputGlobalComponentType): JSX.Element {
|
||||||
const globalVariablesEntries = useGlobalVariablesStore(
|
const globalVariablesEntries = useGlobalVariablesStore(
|
||||||
(state) => state.globalVariablesEntries
|
(state) => state.globalVariablesEntries
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,15 @@ export type InputListComponentType = {
|
||||||
editNode?: boolean;
|
editNode?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type InputGlobalComponentType =
|
||||||
|
{
|
||||||
|
disabled: boolean,
|
||||||
|
onChange: (value: string) => void,
|
||||||
|
setDb: (value: boolean) => void,
|
||||||
|
name: string,
|
||||||
|
data: NodeDataType,
|
||||||
|
};
|
||||||
|
|
||||||
export type KeyPairListComponentType = {
|
export type KeyPairListComponentType = {
|
||||||
value: any;
|
value: any;
|
||||||
onChange: (value: Object[]) => void;
|
onChange: (value: Object[]) => void;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue