File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
site/src/components/DropdownButton Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change
1
+ import Tooltip from "@material-ui/core/Tooltip"
1
2
import Button from "@material-ui/core/Button"
2
3
import { makeStyles } from "@material-ui/core/styles"
3
4
import BlockIcon from "@material-ui/icons/Block"
@@ -73,12 +74,19 @@ export const CancelButton: FC<React.PropsWithChildren<WorkspaceAction>> = ({ han
73
74
74
75
// this is an icon button, so it's important to include an aria label
75
76
return (
76
- < WorkspaceActionButton
77
- icon = { < BlockIcon /> }
78
- onClick = { handleAction }
79
- className = { styles . cancelButton }
80
- ariaLabel = "cancel action"
81
- />
77
+ < div >
78
+ < Tooltip title = "Cancel action" >
79
+ { /* We had to wrap the button to make it work with the tooltip. */ }
80
+ < div >
81
+ < WorkspaceActionButton
82
+ icon = { < BlockIcon /> }
83
+ onClick = { handleAction }
84
+ className = { styles . cancelButton }
85
+ ariaLabel = "cancel action"
86
+ />
87
+ </ div >
88
+ </ Tooltip >
89
+ </ div >
82
90
)
83
91
}
84
92
You can’t perform that action at this time.
0 commit comments