mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 17:12:29 +08:00
Button: Only set pointer-events: none; on disabled LinkButtons (#44006)
This commit is contained in:
@ -82,7 +82,15 @@ export const LinkButton = React.forwardRef<HTMLAnchorElement, ButtonLinkProps>(
|
||||
iconOnly: !children,
|
||||
});
|
||||
|
||||
const linkButtonStyles = cx(styles.button, { [styles.disabled]: disabled }, className);
|
||||
const linkButtonStyles = cx(
|
||||
styles.button,
|
||||
{
|
||||
[css(styles.disabled, {
|
||||
pointerEvents: 'none',
|
||||
})]: disabled,
|
||||
},
|
||||
className
|
||||
);
|
||||
|
||||
deprecatedPropWarning(
|
||||
variant === 'link',
|
||||
@ -228,7 +236,6 @@ function getPropertiesForDisabled(theme: GrafanaTheme2, variant: ButtonVariant,
|
||||
const disabledStyles: CSSObject = {
|
||||
cursor: 'not-allowed',
|
||||
boxShadow: 'none',
|
||||
pointerEvents: 'none',
|
||||
color: theme.colors.text.disabled,
|
||||
transition: 'none',
|
||||
};
|
||||
|
Reference in New Issue
Block a user