feat: scrollable bottom sheet
This commit is contained in:
parent
85bcb0c757
commit
54fdb7066f
|
@ -1,7 +1,7 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
|
||||||
import React, { PureComponent, type Node } from 'react';
|
import React, { PureComponent, type Node } from 'react';
|
||||||
import { Platform, SafeAreaView, View } from 'react-native';
|
import { Platform, SafeAreaView, ScrollView, View } from 'react-native';
|
||||||
|
|
||||||
import { ColorSchemeRegistry } from '../../../color-scheme';
|
import { ColorSchemeRegistry } from '../../../color-scheme';
|
||||||
import { SlidingView } from '../../../react';
|
import { SlidingView } from '../../../react';
|
||||||
|
@ -61,7 +61,9 @@ class BottomSheet extends PureComponent<Props> {
|
||||||
styles.sheetItemContainer,
|
styles.sheetItemContainer,
|
||||||
_styles.sheet
|
_styles.sheet
|
||||||
] }>
|
] }>
|
||||||
|
<ScrollView bounces = { false }>
|
||||||
{ this._getWrappedContent() }
|
{ this._getWrappedContent() }
|
||||||
|
</ScrollView>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</SlidingView>
|
</SlidingView>
|
||||||
|
|
|
@ -37,12 +37,15 @@ export const bottomSheetStyles = {
|
||||||
* Style for the container of the sheet.
|
* Style for the container of the sheet.
|
||||||
*/
|
*/
|
||||||
sheetContainer: {
|
sheetContainer: {
|
||||||
alignContent: 'stretch',
|
alignItems: 'stretch',
|
||||||
flex: 1,
|
flex: 1,
|
||||||
flexDirection: 'column'
|
flexDirection: 'column',
|
||||||
|
justifyContent: 'flex-end'
|
||||||
},
|
},
|
||||||
|
|
||||||
sheetItemContainer: {
|
sheetItemContainer: {
|
||||||
|
flex: -1,
|
||||||
|
maxHeight: '60%',
|
||||||
paddingHorizontal: MD_ITEM_MARGIN_PADDING
|
paddingHorizontal: MD_ITEM_MARGIN_PADDING
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue