Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Unexpected override of BottomSheetBackdrop style #2177

Closed
fabriziocucci opened this issue Feb 23, 2025 · 1 comment
Closed

[Bug]: Unexpected override of BottomSheetBackdrop style #2177

fabriziocucci opened this issue Feb 23, 2025 · 1 comment
Assignees
Labels
bug Something isn't working v5

Comments

@fabriziocucci
Copy link

fabriziocucci commented Feb 23, 2025

Version

v5.1.1

Reanimated Version

v3

Gesture Handler Version

v2

Platforms

iOS, Android

What happened?

When supporting multiple themes, it should be easy to override the BottomSheetBackdrop background by simply passing the style prop but unfortunately it seems that the override is not working as expected, i.e. this

<BottomSheetBackdrop
  {...props}
  appearsOnIndex={0}
  disappearsOnIndex={-1}
  style={{backgroundColor: "white"}}
/>

leads to the BottomSheetBackdrop to lose also the absolute positioning style.

What I'm currently doing as a workaround is re-applying all the necessary style:

<BottomSheetBackdrop
  {...props}
  appearsOnIndex={0}
  disappearsOnIndex={-1}
  style={{backgroundColor: "white", bottom: 0, left: 0, position: "absolute", right: 0, top: 0}}
/>

Reproduction steps

See attached reproduction sample.

Reproduction sample

https://snack.expo.dev/@fabrizio.cucci/bottom-sheet---issue-reproduction-template

Relevant log output

@fabriziocucci fabriziocucci added the bug Something isn't working label Feb 23, 2025
@gorhom gorhom self-assigned this Mar 9, 2025
@gorhom gorhom added the v5 label Mar 9, 2025
@gorhom
Copy link
Owner

gorhom commented Mar 9, 2025

should be fixed in the latest release 👍

@gorhom gorhom closed this as completed Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v5
Projects
None yet
Development

No branches or pull requests

2 participants