在 react-native 中使用 fontAwesome 5 时:0.64.2
显示划线框
import React from 'react'
import { Text, View, StyleSheet, TouchableOpacity } from 'react-native';
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
function TodoItem({ item, pressHandler }) {
return (
<TouchableOpacity onPress={() => pressHandler(item.key)}>
<View style={styles.text}>
<FontAwesome5 name={'comments-dollar'} size={50} color="red"/>
<Text style={styles.text}>{item.text}</Text>
</View>
</TouchableOpacity>
)
}
const styles = StyleSheet.create({
text: {
padding: 16,
marginTop: 16,
borderColor: '#bbb',
borderWidth: 1,
borderStyle: 'dashed',
borderRadius: 10
}
})
export default TodoItem