input alignment fix (#10577)

this fix was already the case before this
[change](https://github.com/twentyhq/twenty/pull/10124/files#diff-a48e37b645699a3309d359e3084f0218c38441585d8e3884083c411dacb096f4L273)

Unsure why this change was necessary. 

<img width="914" alt="Screenshot 2025-02-28 at 16 02 38"
src="https://github.com/user-attachments/assets/c8bd791b-81b3-429b-9d0a-88a47058a979"
/>
This commit is contained in:
nitin
2025-02-28 17:39:11 +05:30
committed by GitHub
parent a234e00657
commit 85bfd87bb4
2 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
import React from 'react';
import styled from '@emotion/styled';
import React from 'react';
const StyledInputErrorHelper = styled.div`
color: ${({ theme }) => theme.color.red};
@ -13,13 +13,11 @@ const StyledErrorContainer = styled.div`
export const InputErrorHelper = ({
children,
isVisible = true,
}: {
children?: React.ReactNode;
isVisible?: boolean;
}) => (
<StyledErrorContainer>
{children && isVisible && (
{children && (
<StyledInputErrorHelper aria-live="polite">
{children}
</StyledInputErrorHelper>

View File

@ -357,7 +357,9 @@ const TextInputV2Component = forwardRef<
)}
</StyledTrailingIconContainer>
</StyledInputContainer>
<InputErrorHelper isVisible={!noErrorHelper}>{error}</InputErrorHelper>
{!noErrorHelper && error && (
<InputErrorHelper>{error}</InputErrorHelper>
)}
</StyledContainer>
);
},