feat: improve update button visibility (#3115)

* feat: give update button primary focus when applicable

resolves #3024

* added update tooltip

* cleanup

* prettier

* PR feedback
This commit is contained in:
Kira Pilot
2022-07-22 14:28:52 -04:00
committed by GitHub
parent 2dd98c7ec8
commit 471564df7d
16 changed files with 131 additions and 79 deletions

View File

@ -110,16 +110,17 @@ export const HelpTooltipLink: React.FC<{ href: string }> = ({ children, href })
)
}
export const HelpTooltipAction: React.FC<{ icon: Icon; onClick: () => void }> = ({
children,
icon: Icon,
onClick,
}) => {
export const HelpTooltipAction: React.FC<{
icon: Icon
onClick: () => void
ariaLabel?: string
}> = ({ children, icon: Icon, onClick, ariaLabel }) => {
const styles = useStyles()
const tooltip = useHelpTooltip()
return (
<button
aria-label={ariaLabel ?? ""}
className={styles.action}
onClick={(event) => {
event.stopPropagation()