import React from 'react'; import { storiesOf, action } from '@kadira/storybook'; import { ScrollView, StyleSheet, Text, View } from 'react-native' storiesOf('component: ScrollView', module) .add('vertical', () => ( console.log('ScrollView.onScroll', e)} scrollEventThrottle={1} // 1 event per second style={styles.scrollViewStyle} > {Array.from({ length: 50 }).map((item, i) => ( {i} ))} )) .add('horizontal', () => ( console.log('ScrollView.onScroll', e)} scrollEventThrottle={1} // 1 event per second style={styles.scrollViewStyle} > {Array.from({ length: 50 }).map((item, i) => ( {i} ))} )) const styles = StyleSheet.create({ box: { alignItems: 'center', flexGrow: 1, justifyContent: 'center', borderWidth: 1 }, scrollViewContainer: { height: '200px', width: 300 }, scrollViewStyle: { borderWidth: '1px' }, scrollViewContentContainerStyle: { padding: '10px' } })