emilkowalski / vaul

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

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

Closed sshmaxime closed 2 months ago

sshmaxime commented 2 months 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 2 months 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 2 months ago

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