1
1
import React , { Component } from 'react' ;
2
- import { Alert , Animated , StyleSheet , Text , View } from 'react-native' ;
2
+ import { Animated , StyleSheet , Text , View } from 'react-native' ;
3
3
4
4
import {
5
5
PanGestureHandler ,
@@ -114,7 +114,7 @@ export const InfoButton = props => (
114
114
< BorderlessButton
115
115
{ ...props }
116
116
style = { styles . infoButton }
117
- onPress = { ( ) => Alert . alert ( `${ props . name } info button clicked` ) } >
117
+ onPress = { ( ) => alert ( `${ props . name } info button clicked` ) } >
118
118
< View style = { styles . infoButtonBorders } >
119
119
< Text style = { styles . infoButtonText } > i</ Text >
120
120
</ View >
@@ -132,7 +132,7 @@ export default class Example extends Component {
132
132
< Swipeable >
133
133
< RectButton
134
134
style = { styles . rectButton }
135
- onPress = { ( ) => Alert . alert ( 'First row clicked' ) } >
135
+ onPress = { ( ) => alert ( 'First row clicked' ) } >
136
136
< Text style = { styles . buttonText } >
137
137
Swipe this row & observe highlight delay
138
138
</ Text >
@@ -147,7 +147,7 @@ export default class Example extends Component {
147
147
< View style = { styles . buttonDelimiter } />
148
148
< RectButton
149
149
style = { styles . rectButton }
150
- onPress = { ( ) => Alert . alert ( 'Second row clicked' ) } >
150
+ onPress = { ( ) => alert ( 'Second row clicked' ) } >
151
151
< Text style = { styles . buttonText } >
152
152
Second info icon will block scrolling
153
153
</ Text >
@@ -160,7 +160,7 @@ export default class Example extends Component {
160
160
< RectButton
161
161
rippleColor = "red"
162
162
style = { styles . rectButton }
163
- onPress = { ( ) => Alert . alert ( 'Third row clicked' ) } >
163
+ onPress = { ( ) => alert ( 'Third row clicked' ) } >
164
164
< Text style = { styles . buttonText } >
165
165
This one will cancel when you drag outside
166
166
</ Text >
@@ -175,7 +175,7 @@ export default class Example extends Component {
175
175
< RectButton
176
176
enabled = { false }
177
177
style = { styles . rectButton }
178
- onPress = { ( ) => Alert . alert ( 'Fourth row clicked' ) } >
178
+ onPress = { ( ) => alert ( 'Fourth row clicked' ) } >
179
179
< Text style = { styles . buttonText } >
180
180
This row is "disabled" but you can swipe it
181
181
</ Text >
@@ -184,12 +184,12 @@ export default class Example extends Component {
184
184
</ Swipeable >
185
185
< LongPressGestureHandler
186
186
onHandlerStateChange = { ( { nativeEvent } ) =>
187
- nativeEvent . state === State . ACTIVE && Alert . alert ( 'Long' )
187
+ nativeEvent . state === State . ACTIVE && alert ( 'Long' )
188
188
} >
189
189
< RectButton
190
190
rippleColor = "red"
191
191
style = { styles . rectButton }
192
- onPress = { ( ) => Alert . alert ( 'Fifth row clicked' ) } >
192
+ onPress = { ( ) => alert ( 'Fifth row clicked' ) } >
193
193
< Text style = { styles . buttonText } >
194
194
Clickable row with long press handler
195
195
</ Text >
0 commit comments