From c7533b83e93b4b73e4f3410e95559f008464d51c Mon Sep 17 00:00:00 2001 From: LautaroPetaccio Date: Tue, 30 Jul 2024 18:04:12 -0300 Subject: [PATCH] fix: Remove icon if message is present --- src/components/Field/Field.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Field/Field.tsx b/src/components/Field/Field.tsx index 617b787b..596c3f52 100644 --- a/src/components/Field/Field.tsx +++ b/src/components/Field/Field.tsx @@ -21,7 +21,7 @@ export type FieldProps = InputProps & { label?: string /** Boolean flag to show an error, default on false*/ error?: boolean - /** Message to display below the input*/ + /** Message to display below the input */ message?: React.ReactNode /** Button text to display before input to dispatch an action*/ action?: string @@ -114,6 +114,7 @@ export class Field extends React.PureComponent { label, error, warning, + message, info, type, loading, @@ -129,7 +130,7 @@ export class Field extends React.PureComponent { } = this.props const isAddress = this.isAddress() - const icon = error && !isAddress ? 'warning circle' : void 0 + const icon = error && !message && !isAddress ? 'warning circle' : void 0 const classes = classnames('dcl field', kind, { error, warning: !error && warning,