Revert "Remove reference to data-testid from styling" (#10635)

Reverts twentyhq/twenty#10407
This commit is contained in:
Weiko
2025-03-03 19:15:12 +01:00
committed by GitHub
parent e8b6b1b941
commit 41db10daff
9 changed files with 25 additions and 62 deletions

View File

@ -8,7 +8,6 @@ export type LinkAvatarChipProps = Omit<AvatarChipsCommonProps, 'clickable'> & {
to: string;
onClick?: LinkChipProps['onClick'];
variant?: AvatarChipVariant;
isLabelHidden?: boolean;
};
export const LinkAvatarChip = ({
@ -25,13 +24,11 @@ export const LinkAvatarChip = ({
placeholderColorSeed,
size,
variant,
isLabelHidden,
}: LinkAvatarChipProps) => (
<LinkChip
to={to}
onClick={onClick}
label={name}
isLabelHidden={isLabelHidden}
variant={
//Regular but Highlighted -> missleading
variant === AvatarChipVariant.Regular

View File

@ -26,7 +26,6 @@ export type ChipProps = {
disabled?: boolean;
clickable?: boolean;
label: string;
isLabelHidden?: boolean;
maxWidth?: number;
variant?: ChipVariant;
accent?: ChipAccent;
@ -125,7 +124,6 @@ const StyledContainer = withTheme(styled.div<
export const Chip = ({
size = ChipSize.Small,
label,
isLabelHidden = false,
disabled = false,
clickable = true,
variant = ChipVariant.Regular,
@ -147,9 +145,7 @@ export const Chip = ({
maxWidth={maxWidth}
>
{leftComponent?.()}
{!isLabelHidden && (
<OverflowingTextWithTooltip size={size} text={label} />
)}
<OverflowingTextWithTooltip size={size} text={label} />
{rightComponent?.()}
</StyledContainer>
);

View File

@ -27,7 +27,6 @@ export const LinkChip = ({
to,
size = ChipSize.Small,
label,
isLabelHidden = false,
variant = ChipVariant.Regular,
leftComponent = null,
rightComponent = null,
@ -41,7 +40,6 @@ export const LinkChip = ({
<Chip
size={size}
label={label}
isLabelHidden={isLabelHidden}
clickable={true}
variant={variant}
leftComponent={leftComponent}