UNPKG

react-native-story-component

Version:
51 lines 1.42 kB
import React from 'react'; import { View, FlatList, StyleSheet } from 'react-native'; import StoryCircleListItem from './StoryCircleListItem'; const StoryCircleListView = props => { const { data, handleStoryItemPress, unPressedBorderColor, pressedBorderColor, avatarSize, showText, textStyle } = props; return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(FlatList, { keyExtractor: item => `story-item-${item.id}`, data: data, horizontal: true, style: styles.container, showsVerticalScrollIndicator: false, showsHorizontalScrollIndicator: false, ListFooterComponent: /*#__PURE__*/React.createElement(View, { style: styles.footer }), renderItem: _ref => { let { item, index } = _ref; return /*#__PURE__*/React.createElement(StoryCircleListItem, { avatarSize: avatarSize, handleStoryItemPress: () => handleStoryItemPress && handleStoryItemPress(item, index), unPressedBorderColor: unPressedBorderColor, pressedBorderColor: pressedBorderColor, item: item, showText: showText, textStyle: textStyle }); } })); }; const styles = StyleSheet.create({ container: { paddingLeft: 12 }, footer: { flex: 1, width: 8 } }); export default StoryCircleListView; //# sourceMappingURL=StoryCircleListView.js.map