diff --git a/src/@types/ApiStructures.ts b/src/@types/ApiStructures.ts index 384f0a7..a45365a 100644 --- a/src/@types/ApiStructures.ts +++ b/src/@types/ApiStructures.ts @@ -61,8 +61,9 @@ type FlagConsumer = 'client' | 'server' | 'api' export type Flag = { id: string, name: string, - env: FlagEnv, - consumer: FlagConsumer, + env: string, //FlagEnv, + consumer: string, // FlagConsumer, value: FlagType, - type: string + type: string, + hierarchy: string } \ No newline at end of file diff --git a/src/components/InputElements.tsx b/src/components/InputElements.tsx index 4171b37..643b36e 100644 --- a/src/components/InputElements.tsx +++ b/src/components/InputElements.tsx @@ -41,8 +41,8 @@ export const FileSelector = ({ cb }: { cb: (file: File) => void }) => { export type InputElementProperties = { value?: T, inputRef?: React.RefObject, - onChange?: React.ChangeEventHandler, - children?: string, + onChange?: React.ChangeEventHandler, + children?: React.ReactNode, //JSX.Element | JSX.Element[] | string, placeholder?: string } @@ -78,19 +78,23 @@ type StringInputProperties = { minLength?: number } & ManualInputProperties export const StringInput = ({ value, onChange, inputRef, children, placeholder, onBlur, onKeyUp, minLength, maxLength }: StringInputProperties) => { - return ; + + const input = ; + if (children) + return ; + return input; }; export type NumberInputProperties = { @@ -106,23 +110,48 @@ export const NumberInput = ({ children, placeholder, inputRef, onChange, value, else if (type === 'int') step = 1; else step = 1; } - return