@@ -29,6 +29,7 @@ import { PinchableBox } from '../../recipes/scaleAndRotate';
29
29
import { PressBox } from '../../basic/multitap' ;
30
30
31
31
import { LoremIpsum } from '../../common' ;
32
+ import { InfoButton } from './InfoButton' ;
32
33
33
34
const CHILD_REF = 'CHILD_REF' ;
34
35
@@ -176,14 +177,41 @@ class Combo extends Component<ComboProps> {
176
177
< RectButton
177
178
style = { styles . rectButton }
178
179
onPress = { ( ) => Alert . alert ( 'First row clicked' ) } >
179
- < Button title = "first" />
180
+ < Text style = { styles . buttonText } >
181
+ Swipe this row & observe highlight delay
182
+ </ Text >
183
+ { /* Info icon will cancel when you scroll in the direction of the scrollview
184
+ but if you move finger horizontally it would allow you to "re-enter" into
185
+ an active state. This is typical for most of the buttons on iOS (but not
186
+ on Android where the touch cancels as soon as you leave the area of the
187
+ button). */ }
188
+ < InfoButton name = "first" />
180
189
</ RectButton >
181
190
</ Swipeable >
182
191
< View style = { styles . buttonDelimiter } />
183
192
< RectButton
184
193
style = { styles . rectButton }
185
194
onPress = { ( ) => Alert . alert ( 'Second row clicked' ) } >
186
- < Button title = "second" />
195
+ < Text style = { styles . buttonText } >
196
+ Second info icon will block scrolling
197
+ </ Text >
198
+ { /* Info icon will block interaction with other gesture handlers including
199
+ the scrollview handler its a descendant of. This is typical for buttons
200
+ embedded in a scrollable content on iOS. */ }
201
+ < InfoButton disallowInterruption name = "second" />
202
+ </ RectButton >
203
+ < View style = { styles . buttonDelimiter } />
204
+ < RectButton
205
+ style = { styles . rectButton }
206
+ onPress = { ( ) => Alert . alert ( 'Third row clicked' ) } >
207
+ < Text style = { styles . buttonText } >
208
+ This one will cancel when you drag outside
209
+ </ Text >
210
+ { /* Info icon will cancel when you drag your finger outside of its bounds and
211
+ then back unlike all the previous icons that would activate when you re-enter
212
+ their activation area. This is a typical bahaviour for android but less frequent
213
+ for most of the iOS native apps. */ }
214
+ < InfoButton shouldCancelWhenOutside name = "third" />
187
215
</ RectButton >
188
216
</ View >
189
217
< LoremIpsum />
0 commit comments