Skip to content

Commit

Permalink
Make Label Cursor Hoverable (#3332)
Browse files Browse the repository at this point in the history
* make howerable

* make howerable1

* addressed comments

* fix failure

* last comments

* last comments1
  • Loading branch information
YuliaKrimerman authored Oct 18, 2024
1 parent 0cb198c commit 2305d0a
Showing 1 changed file with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ enum ConditionStatus {
True = 'True',
False = 'False',
}

interface ModelRegistryTableRowStatusProps {
conditions: K8sCondition[] | undefined;
}
Expand Down Expand Up @@ -121,8 +120,23 @@ export const ModelRegistryTableRowStatus: React.FC<ModelRegistryTableRowStatusPr
}
}

const isClickable = popoverTitle && popoverMessages.length;

const label = (
<Label data-testid="model-registry-label" icon={icon} color={color} isCompact>
<Label
{...(isClickable
? {
onClick: () => {
/* intentional no-op - Click event is handled by the Popover parent,
this prop enables clickable styles in the PatternFly Label */
},
}
: {})}
data-testid="model-registry-label"
icon={icon}
color={color}
isCompact
>
{statusLabel}
</Label>
);
Expand Down

0 comments on commit 2305d0a

Please sign in to comment.