emilkowalski / vaul

An unstyled drawer component for React.
https://vaul.emilkowal.ski
MIT License
6k stars 201 forks source link

`setBackgroundColorOnScale` should be `false` by default. #431

Closed sshmaxime closed 1 week ago

sshmaxime commented 1 week ago

Title.

If against, could you please explain why ? And what was the rationale why it was done like this in the first place ?

emilkowalski commented 1 week ago

This is done by the library to achieve the iOS-like effect when shouldScaleBackground is true. Otherwise you'd need to set the background color yourself everytime. Usually when you scale the background you want it to be black anyways.

Note that this black background is set only when you do scale the background with shouldScaleBackground

sshmaxime commented 1 week ago

Yeah I think I wasn't understand its initial purpose, it make more sense now. Thanks