|
|
@ -31,6 +31,18 @@ function getDownloadIcon(isGrabbing, isGrabbed, grabError) {
|
|
|
|
return icons.DOWNLOAD;
|
|
|
|
return icons.DOWNLOAD;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function getDownloadKind(isGrabbed, grabError) {
|
|
|
|
|
|
|
|
if (isGrabbed) {
|
|
|
|
|
|
|
|
return kinds.SUCCESS;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (grabError) {
|
|
|
|
|
|
|
|
return kinds.DANGER;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return kinds.DEFAULT;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function getDownloadTooltip(isGrabbing, isGrabbed, grabError) {
|
|
|
|
function getDownloadTooltip(isGrabbing, isGrabbed, grabError) {
|
|
|
|
if (isGrabbing) {
|
|
|
|
if (isGrabbing) {
|
|
|
|
return '';
|
|
|
|
return '';
|
|
|
@ -148,7 +160,7 @@ class InteractiveSearchRow extends Component {
|
|
|
|
<TableRowCell className={styles.download}>
|
|
|
|
<TableRowCell className={styles.download}>
|
|
|
|
<SpinnerIconButton
|
|
|
|
<SpinnerIconButton
|
|
|
|
name={getDownloadIcon(isGrabbing, isGrabbed, grabError)}
|
|
|
|
name={getDownloadIcon(isGrabbing, isGrabbed, grabError)}
|
|
|
|
kind={grabError ? kinds.DANGER : kinds.DEFAULT}
|
|
|
|
kind={getDownloadKind(isGrabbed, grabError)}
|
|
|
|
title={getDownloadTooltip(isGrabbing, isGrabbed, grabError)}
|
|
|
|
title={getDownloadTooltip(isGrabbing, isGrabbed, grabError)}
|
|
|
|
isDisabled={isGrabbed}
|
|
|
|
isDisabled={isGrabbed}
|
|
|
|
isSpinning={isGrabbing}
|
|
|
|
isSpinning={isGrabbing}
|
|
|
|