Skip to content

Commit 39bcee9

Browse files
committed
fix(QuickStartTile): updated class application for active tile
1 parent 1eb3799 commit 39bcee9

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

packages/module/src/catalog/QuickStartTile.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,18 +132,14 @@ const QuickStartTile: FC<QuickStartTileProps> = ({
132132
/>
133133
) : undefined;
134134

135+
const cardClasses = `pfext-catalog-item${isActive ? ' pf-m-current' : ''}`;
136+
135137
return (
136138
<Card
137139
id={`${id}-catalog-tile`}
138140
style={{ height: '100%' }}
139141
data-testid={`qs-card-${camelize(displayName)}`}
140-
className="pfext-catalog-item"
141-
{...(isActive && {
142-
isClickable: true,
143-
isSelectable: true,
144-
isSelected: true,
145-
isClicked: true,
146-
})}
142+
className={cardClasses}
147143
>
148144
<CardHeader
149145
{...(action && {

packages/module/src/catalog/__tests__/QuickStartTile.spec.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ describe('QuickStartTile', () => {
1818
);
1919
const catalogTile = wrapper.find(Card);
2020
expect(catalogTile.exists()).toBeTruthy();
21+
expect(catalogTile.hasClass('pf-m-current')).toBe(false);
2122
});
2223

2324
it('should load proper catalog tile with featured property', () => {
@@ -31,6 +32,6 @@ describe('QuickStartTile', () => {
3132
);
3233
const catalogTile = wrapper.find(Card);
3334
expect(catalogTile.exists()).toBeTruthy();
34-
expect(catalogTile.prop('isSelected')).toBe(true);
35+
expect(catalogTile.hasClass('pf-m-current')).toBe(true);
3536
});
3637
});

0 commit comments

Comments
 (0)