Wizard: add support for other input type in HookValidatedInput

adds `type` prop to `HookValidatedInput` with a default of 'text', to be able to support other type input like 'password'
This commit is contained in:
Michal Gold 2024-11-10 11:48:33 +02:00 committed by Klara Simickova
parent 0f111a4e6a
commit ba9546193e

View file

@ -38,6 +38,7 @@ export const HookValidatedInput = ({
onChange,
stepValidation,
fieldName,
type = 'text',
}: HookValidatedTextInputPropTypes) => {
const [isPristine, setIsPristine] = useState(!value ? true : false);
// Do not surface validation on pristine state components
@ -60,7 +61,7 @@ export const HookValidatedInput = ({
value={value}
data-testid={dataTestId}
ouiaId={ouiaId}
type="text"
type={type}
onChange={onChange}
validated={validated}
aria-label={ariaLabel}