ui phase 12
This commit is contained in:
@@ -75,6 +75,10 @@ const AppIconButton: FunctionComponent<AppIconButtonProps> = ({
|
||||
component={componentToRender}
|
||||
color={colorToRender}
|
||||
disabled={disabled}
|
||||
// Named directly on the button (not only via the Tooltip wrap below) so an icon-only button
|
||||
// keeps an accessible name even when disabled, when the Tooltip isn't rendered at all. A
|
||||
// caller-supplied `aria-label` in restOfProps still wins (spread last).
|
||||
aria-label={title}
|
||||
sx={sxToRender}
|
||||
{...restOfProps}
|
||||
>
|
||||
@@ -82,7 +86,7 @@ const AppIconButton: FunctionComponent<AppIconButtonProps> = ({
|
||||
{children}
|
||||
</IconButton>
|
||||
);
|
||||
}, [color, componentToRender, children, disabled, icon, isMuiColor, sx, iconProps, restOfProps]);
|
||||
}, [color, componentToRender, children, disabled, icon, isMuiColor, sx, iconProps, restOfProps, title]);
|
||||
|
||||
// When title is set, wrap the IconButton with Tooltip.
|
||||
// Note: when IconButton is disabled the Tooltip is not working, so we don't need it
|
||||
|
||||
Reference in New Issue
Block a user