diff --git a/frontend/src/InteractiveSearch/InteractiveSearchRow.js b/frontend/src/InteractiveSearch/InteractiveSearchRow.js index 7d4bddf9e..ce32f12bd 100644 --- a/frontend/src/InteractiveSearch/InteractiveSearchRow.js +++ b/frontend/src/InteractiveSearch/InteractiveSearchRow.js @@ -32,6 +32,18 @@ function getDownloadIcon(isGrabbing, isGrabbed, grabError) { return icons.DOWNLOAD; } +function getDownloadKind(isGrabbed, grabError, downloadAllowed) { + if (isGrabbed) { + return kinds.SUCCESS; + } + + if (grabError || !downloadAllowed) { + return kinds.DANGER; + } + + return kinds.DEFAULT; +} + function getDownloadTooltip(isGrabbing, isGrabbed, grabError) { if (isGrabbing) { return ''; @@ -212,7 +224,7 @@ class InteractiveSearchRow extends Component { {