diff --git a/packages/ui/v2/core/form/fields.tsx b/packages/ui/v2/core/form/fields.tsx index 16314158ba..0a0f6464eb 100644 --- a/packages/ui/v2/core/form/fields.tsx +++ b/packages/ui/v2/core/form/fields.tsx @@ -164,6 +164,26 @@ type InputFieldProps = { labelClassName?: string; }; +type AddonProps = { + children: React.ReactNode; + isFilled?: boolean; + className?: string; + error?: boolean; +}; + +const Addon = ({ isFilled, children, className, error }: AddonProps) => ( +
+
+ {children} +
+
+); + const InputField = forwardRef(function InputField(props, ref) { const id = useId(); const { t: _t, isLocaleReady, i18n } = useLocale(); @@ -200,26 +220,12 @@ const InputField = forwardRef(function InputF )} {addOnLeading || addOnSuffix ? ( -
-
-
- {addOnLeading || addOnSuffix} -
-
+
+ {addOnLeading && ( + + {addOnLeading} + + )} (function InputF {...passThrough} ref={ref} /> + {addOnSuffix && ( + + {addOnSuffix} + + )}
) : (