From 0f015cadc7f10fafb336d90c9d5d65b21d039f50 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Fri, 11 Aug 2023 15:25:24 -0300 Subject: [PATCH] Fixed password required not showing --- .../src/components/inputComponent/index.tsx | 59 ++++++++++++++----- src/frontend/src/pages/signUpPage/index.tsx | 23 ++++---- src/frontend/src/types/components/index.ts | 2 + 3 files changed, 57 insertions(+), 27 deletions(-) diff --git a/src/frontend/src/components/inputComponent/index.tsx b/src/frontend/src/components/inputComponent/index.tsx index 7adb029c3..5e3c5543c 100644 --- a/src/frontend/src/components/inputComponent/index.tsx +++ b/src/frontend/src/components/inputComponent/index.tsx @@ -1,3 +1,4 @@ +import * as Form from "@radix-ui/react-form"; import { useEffect, useState } from "react"; import { InputComponentType } from "../../types/components"; import { classNames } from "../../utils/utils"; @@ -7,6 +8,8 @@ export default function InputComponent({ value, onChange, disabled, + required = false, + isForm = false, password, editNode = false, placeholder = "Type something...", @@ -23,21 +26,47 @@ export default function InputComponent({ return (
- { - onChange(e.target.value); - }} - /> + {isForm ? ( + + { + onChange(e.target.value); + }} + /> + + ) : ( + { + onChange(e.target.value); + }} + /> + )} {password && (