Skip to content

Commit 79d2184

Browse files
author
Demirci
committed
fix(core/chip): applied inactive state to host
1 parent 3f5d0a4 commit 79d2184

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

packages/core/src/components/chip/chip.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ export class Chip {
128128
<Host
129129
tabIndex="-1"
130130
title={this.hostElement.textContent}
131+
class={{
132+
inactive: isInactive,
133+
}}
131134
style={
132135
this.variant === 'custom'
133136
? {

packages/core/src/components/chip/test/chip.ct.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
* This source code is licensed under the MIT license found in the
77
* LICENSE file in the root directory of this source tree.
88
*/
9-
import { test } from '@utils/test';
109
import { expect } from '@playwright/test';
10+
import { test } from '@utils/test';
1111

1212
test('renders', async ({ mount, page }) => {
1313
await mount(`<ix-chip></ix-chip>`);
@@ -52,3 +52,9 @@ test.describe('chip test', () => {
5252
expect(normalChipSize.width).toEqual(outlineChipSize.width);
5353
});
5454
});
55+
56+
test('check inactive class', async ({ mount, page }) => {
57+
await mount(`<ix-chip active="false">test</ix-chip>`);
58+
const chip = page.locator('ix-chip');
59+
await expect(chip).toHaveClass('inactive hydrated');
60+
});

0 commit comments

Comments
 (0)