File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 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 {
218218 backdrop = (
219219 < TouchableWithoutFeedback
220220 style = { styles . overlay }
221- onPress = { ( ) => this . reset ( ) }
221+ onPress = { ( ) => { this . reset ( ) ; this . props . onOverlayPress ( ) } }
222222 >
223223 < Animated . View
224224 style = {
@@ -264,6 +264,7 @@ ActionButton.propTypes = {
264264 itemSize : PropTypes . number ,
265265 autoInactive : PropTypes . bool ,
266266 onPress : PropTypes . func ,
267+ onOverlayPress : PropTypes . func ,
267268 backdrop : PropTypes . oneOfType ( [
268269 PropTypes . bool ,
269270 PropTypes . object ,
@@ -284,6 +285,7 @@ ActionButton.defaultProps = {
284285 outRangeScale : 1 ,
285286 autoInactive : true ,
286287 onPress : ( ) => { } ,
288+ onOverlayPress : ( ) => { } ,
287289 backdrop : false ,
288290 degrees : 135 ,
289291 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.
9090| outRangeScale | number | 1 | changes size of button during animation
9191| onPress | function | null | fires, when ActionButton is tapped
9292| onLongPress | function | null | fires, when ActionButton is long pressed
93+ | onOverlayPress | function | null | fires, when Overlay is pressed
9394| icon | Component | + | Custom component for ActionButton Icon
9495| 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 ) )
9596| degrees | number | 135 | degrees to rotate icon
You can’t perform that action at this time.
0 commit comments