mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-09 02:49:18 +08:00
fix(wave): make wave effect work with tailwind disabled variant (#54933)
Co-authored-by: Khanh Tran <quangkhanhdeveloper@gmail.com>
This commit is contained in:
@@ -44,7 +44,8 @@ const Wave: React.FC<WaveProps> = (props) => {
|
||||
!node.getAttribute ||
|
||||
node.getAttribute('disabled') ||
|
||||
(node as HTMLInputElement).disabled ||
|
||||
node.className.includes('disabled') ||
|
||||
(node.className.includes('disabled') && !node.className.includes('disabled:')) ||
|
||||
node.getAttribute('aria-disabled') === 'true' ||
|
||||
node.className.includes('-leave')
|
||||
) {
|
||||
return;
|
||||
|
||||
@@ -106,7 +106,7 @@ const InternalSwitch = React.forwardRef<HTMLButtonElement, SwitchProps>((props,
|
||||
};
|
||||
|
||||
return wrapCSSVar(
|
||||
<Wave component="Switch">
|
||||
<Wave component="Switch" disabled={mergedDisabled}>
|
||||
<RcSwitch
|
||||
{...restProps}
|
||||
checked={checked}
|
||||
|
||||
Reference in New Issue
Block a user