diff --git a/look-and-feel/react/src/Form/Text/Text.tsx b/look-and-feel/react/src/Form/Text/Text.tsx index 2d79e5ff0..ffbc43062 100644 --- a/look-and-feel/react/src/Form/Text/Text.tsx +++ b/look-and-feel/react/src/Form/Text/Text.tsx @@ -8,36 +8,38 @@ import { Svg } from "../../Svg"; import { getComponentClassName } from "../../utilities"; import { InputError } from "../InputError"; -type Props = Omit, "required"> & { +type Props = ComponentPropsWithRef<"input"> & { classModifier?: string; helper?: string; error?: string; description?: string; label?: string; - required?: boolean; buttonLabel?: string; onButtonClick?: MouseEventHandler; }; const Text = forwardRef( - ({ className, classModifier = "", ...otherProps }, inputRef) => { - const componentClassName = getComponentClassName( + ( + { className, - classModifier, - "af-form__input-text", - ); - - const { - id, + classModifier = "", label, - required, - disabled, description, helper, error, buttonLabel, onButtonClick, - } = otherProps; + ...otherProps + }, + inputRef, + ) => { + const componentClassName = getComponentClassName( + className, + classModifier, + "af-form__input-text", + ); + + const { id, required } = otherProps; return (
@@ -61,8 +63,6 @@ const Text = forwardRef( className={componentClassName} type="text" ref={inputRef} - required={required} - disabled={disabled} aria-invalid={Boolean(error)} aria-describedby={error ? `${id}-error` : undefined} {...otherProps}