Skip to content

Commit 19b47a2

Browse files
committed
fix: prevent console errors for read only badges in card actions
1 parent ebd8588 commit 19b47a2

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

packages/module/patternfly-docs/content/examples/catalogTile.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
color: var(--pf-t--global--text--color--regular);
33
text-decoration: none;
44
}
5+
.ws-react-e-catalog-tile .pf-v6-c-card__header-main {
6+
display: flex;
7+
}
58
.ws-react-e-catalog-tile .catalog-tile-pf-header .catalog-tile-pf-subtitle {
69
color: var(--pf-t--global--text--color--subtle);
710
font-size: var(--pf-t--global--font--size--body--sm);

packages/module/sass/react-catalog-view-extension/_catalog-tile.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
text-decoration: none;
1212
}
1313

14+
.pf-v6-c-card__header-main {
15+
display: flex;
16+
}
17+
1418
.pf-v6-c-card__actions {
1519
padding-left: 5px;
1620
}

packages/module/src/components/CatalogTile/CatalogTile.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ export class CatalogTile extends React.Component<CatalogTileProps> {
119119
>
120120
{(badges.length > 0 || iconImg || iconClass || icon || onClick || href) && (
121121
<CardHeader
122-
actions={{ actions: badges.length > 0 && this.renderBadges(badges), hasNoOffset: true }}
123122
selectableActions={ (onClick || href) && {
124123
selectableActionId: id + '-input',
125124
onClickAction: (e) => this.handleClick(e),
@@ -129,6 +128,7 @@ export class CatalogTile extends React.Component<CatalogTileProps> {
129128
>
130129
{iconImg && <img className="catalog-tile-pf-icon" src={iconImg} alt={iconAlt} />}
131130
{!iconImg && (iconClass || icon) && <span className={`catalog-tile-pf-icon ${iconClass}`}>{icon}</span>}
131+
{badges.length > 0 && this.renderBadges(badges)}
132132
</CardHeader>
133133
)}
134134
<CardTitle className="catalog-tile-pf-header">

0 commit comments

Comments
 (0)