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

Default backdrop #45

Closed
SpaghettiC0des opened this issue Oct 9, 2020 · 0 comments · Fixed by #109
Closed

Default backdrop #45

SpaghettiC0des opened this issue Oct 9, 2020 · 0 comments · Fixed by #109
Labels
enhancement New feature or request

Comments

@SpaghettiC0des
Copy link

Feature Request

Provide a default backdrop/background component with a translucent background color.

Why it is needed

To distinguish that the bottom sheet is visible, or it pops out when the UI behind is mostly color white.

Possible implementation

backgroundComponent should have a default implementation, I'm thinking it is also useful to export that component as BottomSheetBackdrop so that users can provide custom styling.

noBackdrop prop will also help to disable the default backdrop component.

Code sample

import BottomSheet, {BottomSheetBackdrop} from '@gorhom/react-native-bottom-sheet`;

const MyBackdrop = () => <BottomSheetBackdrop style={{
	backgroundColor: 'red',
}}/>

<BottomSheet />
<BottomSheet noBackdrop/>
<BottomSheet backgroundComponent={MyBackdrop}/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant