1
1
import { hues } from '@sanity/color'
2
2
import { CloseIcon } from '@sanity/icons'
3
- import { Box , Button , Flex , Grid , Stack , Text , Tooltip , useMediaIndex } from '@sanity/ui'
3
+ import { Box , Button , Flex , Grid , Stack , Text , useMediaIndex } from '@sanity/ui'
4
4
import filesize from 'filesize'
5
5
import React from 'react'
6
6
import { useDispatch } from 'react-redux'
@@ -100,10 +100,10 @@ const TableRowUpload = (props: Props) => {
100
100
</ div >
101
101
) }
102
102
103
- { /*
103
+ { /*
104
104
Cancel upload button.
105
105
Assets will only have a `complete` status _after_ it has been created on your dataset.
106
- As such, we also hide the cancel button when `percentLoaded === 100`, as cancelling when the asset
106
+ As such, we also hide the cancel button when `percentLoaded === 100`, as cancelling when the asset
107
107
has been fully uploaded (even with a status of `progress`) won't stop the asset from being created.
108
108
*/ }
109
109
{ ! isComplete && percentLoaded !== 100 && (
@@ -118,27 +118,15 @@ const TableRowUpload = (props: Props) => {
118
118
width : '100%'
119
119
} }
120
120
>
121
- < Tooltip
122
- content = {
123
- < Box padding = { 2 } >
124
- < Text muted size = { 1 } >
125
- Cancel
126
- </ Text >
127
- </ Box >
128
- }
129
- disabled = { 'ontouchstart' in window }
130
- placement = "top"
131
- >
132
- < Button
133
- fontSize = { 3 }
134
- icon = { CloseIcon }
135
- mode = "bleed"
136
- onClick = { handleCancelUpload }
137
- padding = { 2 }
138
- style = { { background : 'none' , boxShadow : 'none' } }
139
- tone = "critical"
140
- />
141
- </ Tooltip >
121
+ < Button
122
+ fontSize = { 3 }
123
+ icon = { CloseIcon }
124
+ mode = "bleed"
125
+ onClick = { handleCancelUpload }
126
+ padding = { 2 }
127
+ style = { { background : 'none' , boxShadow : 'none' } }
128
+ tone = "critical"
129
+ />
142
130
</ Flex >
143
131
) }
144
132
</ Box >
0 commit comments