diff --git a/packages/lib/src/chip/Chip.tsx b/packages/lib/src/chip/Chip.tsx index 67ecabfdb..3cca066ed 100644 --- a/packages/lib/src/chip/Chip.tsx +++ b/packages/lib/src/chip/Chip.tsx @@ -20,7 +20,6 @@ const Chip = styled.div<{ display: inline-flex; align-items: center; justify-content: center; - gap: var(--spacing-gap-xs); background-color: var(--color-bg-primary-lightest); border-radius: var(--border-radius-xl); padding: ${({ size }) => @@ -36,6 +35,13 @@ const Chip = styled.div<{ props.margin && typeof props.margin === "object" && props.margin.left ? spaces[props.margin.left] : ""}; `; +const LeftContainer = styled.div` + display: flex; + align-items: center; + gap: var(--spacing-gap-xxs); + overflow: hidden; +`; + const LabelContainer = styled.span<{ disabled: ChipPropsType["disabled"] }>` font-size: var(--typography-label-s); font-family: var(--typography-font-family); @@ -85,31 +91,33 @@ const DxcChip = ({ action, disabled = false, label, margin, prefix, size = "medi return ( - {prefix && - (typeof prefix === "string" ? ( - - - - ) : isAvatarType(prefix) && size !== "small" ? ( - - ) : ( - isValidElement(prefix) && {prefix} - ))} + + {prefix && + (typeof prefix === "string" ? ( + + + + ) : isAvatarType(prefix) && size !== "small" ? ( + + ) : ( + isValidElement(prefix) && {prefix} + ))} - {label && ( - - - {label} - - - )} + {label && ( + + + {label} + + + )} + {action && (