File tree 2 files changed +10
-1
lines changed
packages/core/src/components/chip
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,9 @@ export class Chip {
128
128
< Host
129
129
tabIndex = "-1"
130
130
title = { this . hostElement . textContent }
131
+ class = { {
132
+ inactive : isInactive ,
133
+ } }
131
134
style = {
132
135
this . variant === 'custom'
133
136
? {
Original file line number Diff line number Diff line change 6
6
* This source code is licensed under the MIT license found in the
7
7
* LICENSE file in the root directory of this source tree.
8
8
*/
9
- import { test } from '@utils/test' ;
10
9
import { expect } from '@playwright/test' ;
10
+ import { test } from '@utils/test' ;
11
11
12
12
test ( 'renders' , async ( { mount, page } ) => {
13
13
await mount ( `<ix-chip></ix-chip>` ) ;
@@ -52,3 +52,9 @@ test.describe('chip test', () => {
52
52
expect ( normalChipSize . width ) . toEqual ( outlineChipSize . width ) ;
53
53
} ) ;
54
54
} ) ;
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
+ } ) ;
You can’t perform that action at this time.
0 commit comments