fix: Links field fixes (#5565)

Related issue: #3607
This commit is contained in:
Thaïs
2024-05-24 17:59:08 +02:00
committed by GitHub
parent fa3443c05b
commit 736c79afde
9 changed files with 84 additions and 106 deletions

View File

@ -87,13 +87,6 @@ const StyledContainer = styled('div', {
}
}}
// Size style overrides
${({ theme, size }) =>
size === ChipSize.Large &&
css`
height: ${theme.spacing(4)};
`}
// Variant style overrides
${({ disabled, theme, variant }) => {
if (variant === ChipVariant.Regular) {
@ -153,6 +146,13 @@ const StyledLabel = styled.span`
white-space: nowrap;
`;
const StyledOverflowingTextWithTooltip = styled(OverflowingTextWithTooltip)<{
size?: ChipSize;
}>`
height: ${({ theme, size }) =>
size === ChipSize.Large ? theme.spacing(4) : 'auto'};
`;
export const Chip = ({
size = ChipSize.Small,
label,
@ -183,7 +183,7 @@ export const Chip = ({
>
{leftComponent}
<StyledLabel>
<OverflowingTextWithTooltip text={label} />
<StyledOverflowingTextWithTooltip size={size} text={label} />
</StyledLabel>
{rightComponent}
</StyledContainer>