From 1b490dd2441ddf5e21273a50d1c158caa1b1f08a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Ferreira?= <63813420+goncalosard@users.noreply.github.com> Date: Fri, 13 Jan 2023 09:44:03 +0000 Subject: [PATCH] fix(core): chip alignment (#259) Co-authored-by: Daniel Leroux --- packages/core/src/components/chip/chip.scss | 6 ++++++ packages/core/src/components/chip/chip.tsx | 11 ++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/core/src/components/chip/chip.scss b/packages/core/src/components/chip/chip.scss index ccee096efc..93cf0d4d03 100644 --- a/packages/core/src/components/chip/chip.scss +++ b/packages/core/src/components/chip/chip.scss @@ -15,6 +15,7 @@ $border-radius: 100px; :host { display: inline-flex; + width: fit-content; position: relative; align-items: center; border-radius: $border-radius; @@ -29,6 +30,11 @@ $border-radius: 100px; margin-right: $tiny-space; } + .hidden { + width: 0px; + margin-right: 0px; + } + margin-left: $tiny-space; .close-button-container { diff --git a/packages/core/src/components/chip/chip.tsx b/packages/core/src/components/chip/chip.tsx index 6ae8eb1bc7..58d0c0a818 100644 --- a/packages/core/src/components/chip/chip.tsx +++ b/packages/core/src/components/chip/chip.tsx @@ -111,9 +111,14 @@ export class Chip { : {} } > - {this.icon ? ( - - ) : null} +