emilkowalski / vaul

A drawer component for React.
https://vaul.emilkowal.ski
MIT License
6.45k stars 215 forks source link

NestedRoot initial transform wrong. #490

Closed jeremiasjutz closed 1 week ago

jeremiasjutz commented 1 month ago

https://github.com/emilkowalski/vaul/blob/504102918ed53d5037c694b2f3300825b4e2f3fb/src/index.tsx#L691

Initial transform of nested Drawer should also respect isVertical(direction), otherwise every nested drawer gets translated in the direction top regardless of the direction prop.

transform: isVertical(direction) ? `scale(${scale}) translate3d(0, ${y}px, 0)` : `scale(${scale}) translate3d(${y}px, 0, 0)`