diff --git a/frontend/src/components/Input.tsx b/frontend/src/components/Input.tsx index f7b1765e..f224e2ba 100644 --- a/frontend/src/components/Input.tsx +++ b/frontend/src/components/Input.tsx @@ -8,6 +8,7 @@ const Input = ({ isAutoFocused = false, placeholder, label, + required = false, maxLength, className, colorVariant = 'silver', @@ -40,13 +41,19 @@ const Input = ({ onChange={onChange} onPaste={onPaste} onKeyDown={onKeyDown} + required={required} > {children} {label && (
- + {label} + {required && ( + + * + + )}
)} diff --git a/frontend/src/components/types/index.ts b/frontend/src/components/types/index.ts index a7ff5405..1d4b3a61 100644 --- a/frontend/src/components/types/index.ts +++ b/frontend/src/components/types/index.ts @@ -9,6 +9,7 @@ export type InputProps = { name?: string; placeholder?: string; label?: string; + required?: boolean; className?: string; children?: React.ReactElement; onChange: (