diff --git a/src/@types/ApiStructures.ts b/src/@types/ApiStructures.ts index d806d2f..0e3e921 100644 --- a/src/@types/ApiStructures.ts +++ b/src/@types/ApiStructures.ts @@ -54,9 +54,9 @@ export type Role = { rateLimits: RateLimits } & APIEntity -type FlagType = string | number | boolean | number[] | null -type FlagEnv = 'test' | 'prod' -type FlagConsumer = 'client' | 'server' | 'api' +export type FlagType = string | number | boolean | number[] | null +// type FlagEnv = 'test' | 'prod' +// type FlagConsumer = 'client' | 'server' | 'api' export type Flag = { id: string, diff --git a/src/components/InputElements.tsx b/src/components/InputElements.tsx index a6ffd63..c58ffdb 100644 --- a/src/components/InputElements.tsx +++ b/src/components/InputElements.tsx @@ -50,25 +50,27 @@ export type InputElementProperties = { inputRef?: React.RefObject, onChange?: React.ChangeEventHandler, children?: React.ReactNode, //JSX.Element | JSX.Element[] | string, - placeholder?: string + placeholder?: string, + required?: boolean, + name?: string } -export const ToggleSwitch = ({ value, onChange, inputRef, children }: InputElementProperties) => +export const ToggleSwitch = ({ name, value, onChange, inputRef, children }: InputElementProperties) => { return ; }; -export const VerticalToggleSwitch = ({ value, onChange, inputRef, children }: InputElementProperties) => +export const VerticalToggleSwitch = ({ name, value, onChange, inputRef, children }: InputElementProperties) => { return ; }; @@ -82,7 +84,7 @@ type StringInputProperties = { maxLength?: number, minLength?: number } & ManualInputProperties -export const StringInput = ({ value, onChange, inputRef, children, placeholder, onBlur, onKeyUp, minLength, maxLength }: StringInputProperties) => +export const StringInput = ({ name, value, onChange, inputRef, children, placeholder, onBlur, onKeyUp, minLength, maxLength, required = false }: StringInputProperties) => { const input = ; if (children) return