fix(ui): disable doc submenu when parent button is disabled (#9750)
This commit is contained in:
@@ -183,6 +183,7 @@ export const Button = forwardRef<HTMLAnchorElement | HTMLButtonElement, Props>((
|
||||
button={<ChevronIcon />}
|
||||
buttonSize={size}
|
||||
className={disabled ? `${baseClass}--popup-disabled` : ''}
|
||||
disabled={disabled}
|
||||
horizontalAlign="right"
|
||||
noBackground
|
||||
render={({ close }) => SubMenuPopupContent({ close: () => close() })}
|
||||
|
||||
@@ -27,5 +27,9 @@
|
||||
&--size-large {
|
||||
padding: base(0.8);
|
||||
}
|
||||
|
||||
&--disabled {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ export const PopupTrigger: React.FC<PopupTriggerProps> = (props) => {
|
||||
`${baseClass}--${buttonType}`,
|
||||
!noBackground && `${baseClass}--background`,
|
||||
size && `${baseClass}--size-${size}`,
|
||||
disabled && `${baseClass}--disabled`,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')
|
||||
|
||||
Reference in New Issue
Block a user