From aa63b4fd901bc50e98877826699412affa127ae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C4=B1dvan?= Date: Thu, 13 Feb 2025 12:21:35 +0300 Subject: [PATCH] fix(core/chip): applied inactive state to host (#1683) Co-authored-by: Demirci Co-authored-by: Daniel Leroux Co-authored-by: AndreasBerliner <41509230+AndreasBerliner@users.noreply.github.com> --- .changeset/brave-jeans-approve.md | 7 +++++++ packages/core/src/components/chip/chip.tsx | 3 +++ packages/core/src/components/chip/test/chip.ct.ts | 8 +++++++- 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .changeset/brave-jeans-approve.md diff --git a/.changeset/brave-jeans-approve.md b/.changeset/brave-jeans-approve.md new file mode 100644 index 0000000000..ce3993b9fe --- /dev/null +++ b/.changeset/brave-jeans-approve.md @@ -0,0 +1,7 @@ +--- +"@siemens/ix": patch +--- + +`active=false` of the `ix-chip` will now show the chip as not interactable. + +Fixed #1656 diff --git a/packages/core/src/components/chip/chip.tsx b/packages/core/src/components/chip/chip.tsx index 282b30c30b..e84de4e1d7 100644 --- a/packages/core/src/components/chip/chip.tsx +++ b/packages/core/src/components/chip/chip.tsx @@ -128,6 +128,9 @@ export class Chip { { await mount(``); @@ -52,3 +52,9 @@ test.describe('chip test', () => { expect(normalChipSize.width).toEqual(outlineChipSize.width); }); }); + +test('check inactive class', async ({ mount, page }) => { + await mount(`test`); + const chip = page.locator('ix-chip'); + await expect(chip).toHaveClass('inactive hydrated'); +});