Skip to content

Commit

Permalink
feat(images): removed change source icon tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
abuyukyi101198 committed Jan 28, 2025
1 parent 97dd52a commit faa7423
Showing 1 changed file with 32 additions and 20 deletions.
52 changes: 32 additions & 20 deletions src/app/images/views/ImageList/ImageListHeader/ImageListHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,27 +181,39 @@ const ImageListHeader = ({
<i className="p-icon--begin-downloading" />
<span>Select upstream images</span>
</Button>
<Button
data-testid="change-source-button"
disabled={!canChangeSource}
onClick={() =>
setSidePanelContent({
view: ImageSidePanelViews.CHANGE_SOURCE,
extras: { hasSources },
})
}
>
Change source
{!canChangeSource && (
<Tooltip
className="u-nudge-right--small"
message="Cannot change source while images are downloading."
position="top-right"

{!canChangeSource ? (
<Tooltip
message="Cannot change source while images are downloading."
position="top-right"
>
<Button
data-testid="change-source-button"
disabled={!canChangeSource}
onClick={() =>
setSidePanelContent({
view: ImageSidePanelViews.CHANGE_SOURCE,
extras: { hasSources },
})
}
>
<Icon name="information" />
</Tooltip>
)}
</Button>
Change source
</Button>
</Tooltip>
) : (
<Button
data-testid="change-source-button"
disabled={!canChangeSource}
onClick={() =>
setSidePanelContent({
view: ImageSidePanelViews.CHANGE_SOURCE,
extras: { hasSources },
})
}
>
Change source
</Button>
)}
</MainToolbar.Controls>
)}
</MainToolbar>
Expand Down

0 comments on commit faa7423

Please sign in to comment.