fix(ripple): z-index adjusted (#2853)

* fix(ripple): z-index adjusted

* fix(ripple): z-index changed
This commit is contained in:
Junior Garcia 2024-04-24 16:37:50 -03:00 committed by GitHub
parent e9fef9bd92
commit 765c04e2a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 3 deletions

View File

@ -0,0 +1,5 @@
---
"@nextui-org/ripple": patch
---
Fix press event on iOS, the ripple zIndex was preventing the press event

View File

@ -36,7 +36,9 @@ const Ripple: FC<RippleProps> = (props) => {
borderRadius: "100%",
transformOrigin: "center",
pointerEvents: "none",
zIndex: 10,
overflow: "hidden",
inset: 0,
zIndex: 0,
top: ripple.y,
left: ripple.x,
width: `${ripple.size}px`,

View File

@ -24,8 +24,8 @@ export function useRipple(props: UseRippleProps = {}) {
{
key: getUniqueID(prevRipples.length.toString()),
size,
x: event.clientX - rect.x - size / 2,
y: event.clientY - rect.y - size / 2,
x: event.clientX - rect.left - size / 2,
y: event.clientY - rect.top - size / 2,
},
]);
}, []);