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:
@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
|
||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
const StyledInputErrorHelper = styled.div`
|
const StyledInputErrorHelper = styled.div`
|
||||||
color: ${({ theme }) => theme.color.red};
|
color: ${({ theme }) => theme.color.red};
|
||||||
@ -13,13 +13,11 @@ const StyledErrorContainer = styled.div`
|
|||||||
|
|
||||||
export const InputErrorHelper = ({
|
export const InputErrorHelper = ({
|
||||||
children,
|
children,
|
||||||
isVisible = true,
|
|
||||||
}: {
|
}: {
|
||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
isVisible?: boolean;
|
|
||||||
}) => (
|
}) => (
|
||||||
<StyledErrorContainer>
|
<StyledErrorContainer>
|
||||||
{children && isVisible && (
|
{children && (
|
||||||
<StyledInputErrorHelper aria-live="polite">
|
<StyledInputErrorHelper aria-live="polite">
|
||||||
{children}
|
{children}
|
||||||
</StyledInputErrorHelper>
|
</StyledInputErrorHelper>
|
||||||
|
|||||||
@ -357,7 +357,9 @@ const TextInputV2Component = forwardRef<
|
|||||||
)}
|
)}
|
||||||
</StyledTrailingIconContainer>
|
</StyledTrailingIconContainer>
|
||||||
</StyledInputContainer>
|
</StyledInputContainer>
|
||||||
<InputErrorHelper isVisible={!noErrorHelper}>{error}</InputErrorHelper>
|
{!noErrorHelper && error && (
|
||||||
|
<InputErrorHelper>{error}</InputErrorHelper>
|
||||||
|
)}
|
||||||
</StyledContainer>
|
</StyledContainer>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user