react-native-raw-bottom-sheet
react-native-raw-bottom-sheet copied to clipboard
How to add a custom icon to draggableIcon?
Hiho,
first and foremost, awesome project!
Is there a way to define my own draggable Icon on the Sheet? Something so it looks like this:
This would be the last piece, so I can start to build. If it's not already in there somehow, I might try to implement it and send in a pull request.
Greets from Austria, Geralt
go to folder node_modules > react-native-raw-bottom-sheet > src > index.js
find and replace this code
{closeOnDragDown && (
<View
{...dragFromTopOnly && this.panResponder.panHandlers}
style={styles.draggableContainer}
>
{this.props.customDraggableIcon}
{/* <View style={[styles.draggableIcon, customStyles.draggableIcon]} /> */}
</View>
)}
then use it like this in a prop
<ActionSheet customDraggableIcon={<Text>Your Custom Draggable Icon</Text>} />
You can apply transparent background to the draggle icon and absolutely position your icon in the sheet.
draggableIcon: { backgroundColor: 'transparent', height: 30, width: '100%', },