From f18aa8117c83c85fa872612ef366e61033d42fb0 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Fri, 1 Sep 2017 14:50:22 -0300 Subject: [PATCH] Delete tags.js --- app/components/tags.js | 125 ----------------------------------------- 1 file changed, 125 deletions(-) delete mode 100644 app/components/tags.js diff --git a/app/components/tags.js b/app/components/tags.js deleted file mode 100644 index 4700ddab4..000000000 --- a/app/components/tags.js +++ /dev/null @@ -1,125 +0,0 @@ -import { StyleSheet, TouchableHighlight, Text, View, TextInput, FlatList } from 'react-native'; -import React from 'react'; -import PropTypes from 'prop-types'; -import Icon from 'react-native-vector-icons/Ionicons'; -import Avatar from './avatar'; - -const styles = StyleSheet.create({ - result: { - marginTop: 15, - padding: 16, - borderWidth: 1, - flexGrow: 1, - flexShrink: 1, - borderColor: '#e1e5e8' - }, - result_item: { - paddingVertical: 8, - flex: 1, - flexDirection: 'row', - alignItems: 'center' - }, - container: { - flexDirection: 'row', - flexWrap: 'wrap', - alignItems: 'flex-start', - width: '100%', - borderWidth: 2, - padding: 4, - paddingRight: 8, - borderColor: '#e1e5e8' - - }, - tag: { - color: '#2f343d', - justifyContent: 'center', - alignItems: 'center', - marginRight: 5, - flexShrink: 1 - }, - iconContainer: { - justifyContent: 'center', - alignItems: 'center', - width: 25, - height: 25, - marginRight: 5 - }, - avatarInitials: { - color: 'white' - }, - input: { - height: 45, - paddingLeft: 10, - flexGrow: 1, - backgroundColor: 'white', - color: 'black', - minWidth: 150 - }, - containerTag: { - backgroundColor: '#f2f3f5', - // justifyContent: 'center', - alignItems: 'center', - marginHorizontal: 2, - marginBottom: 5, - borderRadius: 2, - padding: 8, - margin: 2, - // flex: 1, - // flexGrow: 0, - maxWidth: '100%', - flexShrink: 1, - flexDirection: 'row' - } -}); - -const renderTag = (item, index) => ( this.props.onPress(item, index)} />); - -const renderItemResult = ({ item = '', onPress }) => ( - - - @{item} - ); - -export default class tags extends React.PureComponent { - static propTypes = { - values: PropTypes.array.isRequired, - // onPress: PropTypes.func.isRequired, - placeholder: PropTypes.string.isRequired, - renderItemResult: PropTypes.func, - renderTag: PropTypes.func, - onChangeText: PropTypes.func.isRequired - } - render() { - return ( - - - {this.props.values.map(this.props.renderTag || renderTag)} - - - {this.props.result && this.props.result.length ? item} - style={styles.result} - data={this.props.result || []} - renderItem={e => (this.props.renderItemResult || renderItemResult)(e, this.props.onSelect)} - /> : null} - ); - } -} - -const Item = ({ onPress, label }) => ( - - - {label} - -); - -Item.propTypes = { - label: PropTypes.string.isRequired, - onPress: PropTypes.func.isRequired -};