Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5e594ad

Browse files
refactor: Display tooltip on cancel action (#4421)
1 parenteefc26c commit5e594ad

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

‎site/src/components/DropdownButton/ActionCtas.tsx

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
importTooltipfrom"@material-ui/core/Tooltip"
12
importButtonfrom"@material-ui/core/Button"
23
import{makeStyles}from"@material-ui/core/styles"
34
importBlockIconfrom"@material-ui/icons/Block"
@@ -73,12 +74,19 @@ export const CancelButton: FC<React.PropsWithChildren<WorkspaceAction>> = ({ han
7374

7475
// this is an icon button, so it's important to include an aria label
7576
return(
76-
<WorkspaceActionButton
77-
icon={<BlockIcon/>}
78-
onClick={handleAction}
79-
className={styles.cancelButton}
80-
ariaLabel="cancel action"
81-
/>
77+
<div>
78+
<Tooltiptitle="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>
8290
)
8391
}
8492

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp