rgommezz / react-native-scroll-bottom-sheet

Cross platform scrollable bottom sheet with virtualisation support, native animations at 60 FPS and fully implemented in JS land :fire:
MIT License
1.54k stars 64 forks source link

Fixed bottom component #63

Closed GiorgioBertolotti closed 3 years ago

GiorgioBertolotti commented 3 years ago

Hello, is there any way to achieve a design like the one below? Basically what I need is a button fixed to the bottom of the FlatList.

Schermata 2021-02-22 alle 17 00 18

rgommezz commented 3 years ago

Hey @GiorgioBertolotti,

You'd have to play with position: absolute and zIndex attributes.

The button would have to be a sibling of the BottomSheet component in order to keep it outside the scroll area, something like the below:


<View style={{flex: 1}}>
  <ScrollBottomSheet {...} />
  <View style={{position: 'absolute', bottom: 0, left: 0, right: 0 }}>
    <Button>Anulla</Button>
  </View>
</View>

Closing this since it's outside the scope of the library.