Skip to content

Commit 69d5c2e

Browse files
committed
Fixes most of the playground examples
1 parent 155adeb commit 69d5c2e

3 files changed

Lines changed: 5 additions & 7 deletions

File tree

playground/src/examples/CollapsingHeaderWithScroll.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default class CollapsingHeaderWithScroll extends Component {
6767
);
6868
}
6969
onSnap(event) {
70-
const { id } = event.nativeEvent;
70+
const { id } = event;
7171
if (id === 'bottom') {
7272
this.setState({ canScroll: true });
7373
}

playground/src/examples/SnapTo.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ export default class SnapTo extends Component {
2727
{x: 140, y: 250}
2828
]}
2929
initialPosition={{x: 140, y: 250}}>
30-
<View style={{width: 70, height: 70, backgroundColor: '#EE2C38', borderRadius: 35}} />
30+
<View style={{width: 70, height: 70, backgroundColor: '#EE2C38', borderRadius: 35}}></View>
3131
</Interactable.View>
32+
3233
<View style={styles.button}>
33-
<Button title="Snap To Next" onPress={this.onButtonPress.bind(this)} color='white' />
34+
<Button title="Snap To Next" onPress={this.onButtonPress.bind(this)} />
3435
</View>
3536
</View>
3637
);
@@ -51,8 +52,5 @@ const styles = StyleSheet.create({
5152
backgroundColor: 'white',
5253
},
5354
button: {
54-
position: 'absolute',
55-
left: 110,
56-
backgroundColor: '#459FED'
5755
}
5856
});

playground/src/lib/InteractableView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ export default function injectDependencies( Animated, PanResponder ){
344344
this.endDrag();
345345
}
346346

347-
snapTo( index ) {
347+
snapTo( {index} ) {
348348
let {snapPoints} = this.props;
349349

350350
if( !snapPoints || index === undefined || index >= snapPoints.length ) return;

0 commit comments

Comments
 (0)