Fix-inline-height (#11608)

Follow up from inline height #11553 related to PR #11442


we had some issues with hover styles

Fixes
https://github.com/twentyhq/twenty/issues/11442#issuecomment-2805893663

---------

Co-authored-by: etiennejouan <jouan.etienne@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Guillim
2025-04-16 17:49:04 +02:00
committed by GitHub
parent e1b99a6f39
commit b6901a49bf
10 changed files with 53 additions and 35 deletions

View File

@ -13,19 +13,25 @@ type BooleanDisplayProps = {
value: boolean | null | undefined;
};
const StyledContainer = styled.div`
height: 20px;
display: flex;
align-items: center;
`;
export const BooleanDisplay = ({ value }: BooleanDisplayProps) => {
if (value === null || value === undefined) {
return <></>;
return <StyledContainer />;
}
const isTrue = value === true;
return (
<>
<StyledContainer>
{isTrue ? <IconCheck size={iconSizeSm} /> : <IconX size={iconSizeSm} />}
<StyledBooleanFieldValue>
{isTrue ? 'True' : 'False'}
</StyledBooleanFieldValue>
</>
</StyledContainer>
);
};