From 24ff732729f8d525b97e9fd2316580ad85adc844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LEGRELLE=2C=20F=C3=A9lix?= Date: Mon, 16 Dec 2024 17:28:57 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20use=20InputType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/react/components/input/Input.tsx | 28 +++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/react/components/input/Input.tsx b/packages/react/components/input/Input.tsx index 03f081e5..00b335ca 100644 --- a/packages/react/components/input/Input.tsx +++ b/packages/react/components/input/Input.tsx @@ -126,7 +126,7 @@ const Input = ( const classes = hashClass(styled, clsx('input', localStatus && is(localStatus))) const wrapperClasses = hashClass( styled, - clsx('field', className, type === 'password' && securityGauge && 'has-gauge'), + clsx('field', className, type === InputType.PASSWORD && securityGauge && has('gauge')), ) const hasIcon = iconNameLeft || iconNameRight @@ -134,8 +134,8 @@ const Input = ( const controlClasses = hashClass( styled, clsx('control', { - [has('icons-right')]: hasIcon ?? (iconNameRight || type === 'password'), - ['has-icons-left']: iconNameLeft || type === InputType.SEARCH, + [has('icons-right')]: hasIcon ?? (iconNameRight || type === InputType.PASSWORD), + [has('icons-left')]: iconNameLeft || type === InputType.SEARCH, }), ) @@ -154,7 +154,7 @@ const Input = ( ({ className, name, color, closeIconSearch, onPress }: IconWrapper) => { return (
{ onPress && onPress() if (onIconClick) { @@ -211,7 +211,7 @@ const Input = ( return (
{label && ( -
{help && {help}} - {securityGauge && type === 'password' && ( + {securityGauge && type === InputType.PASSWORD && ( )}