File tree 2 files changed +4
-1
lines changed
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ export default class ActionButton extends Component {
218
218
backdrop = (
219
219
< TouchableWithoutFeedback
220
220
style = { styles . overlay }
221
- onPress = { ( ) => this . reset ( ) }
221
+ onPress = { ( ) => { this . reset ( ) ; this . props . onOverlayPress ( ) } }
222
222
>
223
223
< Animated . View
224
224
style = {
@@ -264,6 +264,7 @@ ActionButton.propTypes = {
264
264
itemSize : PropTypes . number ,
265
265
autoInactive : PropTypes . bool ,
266
266
onPress : PropTypes . func ,
267
+ onOverlayPress : PropTypes . func ,
267
268
backdrop : PropTypes . oneOfType ( [
268
269
PropTypes . bool ,
269
270
PropTypes . object ,
@@ -284,6 +285,7 @@ ActionButton.defaultProps = {
284
285
outRangeScale : 1 ,
285
286
autoInactive : true ,
286
287
onPress : ( ) => { } ,
288
+ onOverlayPress : ( ) => { } ,
287
289
backdrop : false ,
288
290
degrees : 135 ,
289
291
size : 63 ,
Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ Also this example uses `react-native-vector-icons` for the button Icons.
90
90
| outRangeScale | number | 1 | changes size of button during animation
91
91
| onPress | function | null | fires, when ActionButton is tapped
92
92
| onLongPress | function | null | fires, when ActionButton is long pressed
93
+ | onOverlayPress | function | null | fires, when Overlay is pressed
93
94
| icon | Component | + | Custom component for ActionButton Icon
94
95
| backdrop | Component | false | Custom component for use as Backdrop (i.e. [ BlurView] ( https://github.com/react-native-fellowship/react-native-blur#blur-view ) , [ VibrancyView] ( https://github.com/react-native-fellowship/react-native-blur#vibrancy-view ) )
95
96
| degrees | number | 135 | degrees to rotate icon
You can’t perform that action at this time.
0 commit comments