11import { forwardRef , useRef } from 'react' ;
2- import { StyleSheet , FlatList , View } from 'react-native' ;
2+ import { StyleSheet , FlatList , View , Platform } from 'react-native' ;
33import { TrueSheet , type TrueSheetProps } from '@lodev09/react-native-true-sheet' ;
44
55import { DARK , DARK_GRAY , FOOTER_HEIGHT , HEADER_HEIGHT , SPACING , times } from '../../utils' ;
@@ -25,10 +25,17 @@ export const FlatListSheet = forwardRef<TrueSheet, FlatListSheetProps>((props, r
2525 bottomScrollEdgeEffect : 'soft' ,
2626 topScrollEdgeEffect : 'soft' ,
2727 } }
28- header = { < Header style = { styles . header } /> }
28+ header = { < Header /> }
29+ headerStyle = { styles . header }
2930 onDidDismiss = { ( ) => console . log ( 'Sheet FlatList dismissed!' ) }
3031 onDidPresent = { ( ) => console . log ( `Sheet FlatList presented!` ) }
31- footer = { < Footer text = "OPEN BLANK SHEET" onPress = { ( ) => testRef . current ?. present ( ) } /> }
32+ footer = {
33+ < Footer
34+ text = "OPEN BLANK SHEET"
35+ wrapperStyle = { styles . footer }
36+ onPress = { ( ) => testRef . current ?. present ( ) }
37+ />
38+ }
3239 { ...props }
3340 >
3441 < View style = { styles . wrapper } >
@@ -55,6 +62,12 @@ const styles = StyleSheet.create({
5562 wrapper : {
5663 flex : 1 ,
5764 } ,
65+ footer : {
66+ backgroundColor : Platform . select ( {
67+ default : DARK_GRAY ,
68+ ios : undefined ,
69+ } ) ,
70+ } ,
5871 header : {
5972 position : 'absolute' ,
6073 left : 0 ,
0 commit comments