fix(wave): make wave effect work with tailwind disabled variant (#54933)

Co-authored-by: Khanh Tran <quangkhanhdeveloper@gmail.com>
This commit is contained in:
Trần Quang Khánh
2025-09-09 22:24:21 +07:00
committed by GitHub
parent 2e9842cae6
commit dbbdaf394c
2 changed files with 3 additions and 2 deletions

View File

@@ -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;

View File

@@ -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}