rn: refactor BottomSheet

Avoid using a Modal since those create trouble with the view hierarchy.
This commit is contained in:
Saúl Ibarra Corretgé
2019-04-24 13:05:14 +02:00
committed by Zoltan Bettenbuk
parent 89719520e2
commit 70dc22c107
3 changed files with 29 additions and 62 deletions

View File

@@ -28,31 +28,14 @@ export const PLACEHOLDER_COLOR = ColorPalette.lightGrey;
* {@link https://material.io/guidelines/components/bottom-sheets.html}.
*/
export const bottomSheetStyles = createStyleSheet({
/**
* Style for a backdrop which dims the view in the background. This view
* will also be clickable. The backgroundColor is applied to the overlay
* view instead, so the modal animation doesn't affect the backdrop.
*/
backdrop: {
...StyleSheet.absoluteFillObject
},
/**
* Style for the container of the sheet.
*/
container: {
alignItems: 'flex-end',
flex: 1,
flexDirection: 'row',
justifyContent: 'center'
},
/**
* Style for an overlay on top of which the sheet will be displayed.
*/
overlay: {
...StyleSheet.absoluteFillObject,
backgroundColor: 'rgba(127, 127, 127, 0.6)'
bottom: 0,
left: 0,
position: 'absolute',
right: 0
}
});