added nothing here message for empty lists

This commit is contained in:
austinried
2021-07-19 22:23:33 +09:00
parent 9d835f04aa
commit a1b6aa6732
6 changed files with 113 additions and 46 deletions

View File

@@ -0,0 +1,33 @@
import font from '@app/styles/font'
import React from 'react'
import { Text, View, StyleSheet } from 'react-native'
import Icon from 'react-native-vector-icons/MaterialCommunityIcons'
const NothingHere = React.memo<{
height?: number
width?: number
}>(({ height, width }) => {
height = height || 200
width = width || 200
return (
<View style={[styles.container, { height, width }]}>
<Icon name="music-note-outline" color={styles.text.color} size={width / 2} />
<Text style={[styles.text, { fontSize: width / 8 }]}>Nothing here...</Text>
</View>
)
})
const styles = StyleSheet.create({
container: {
justifyContent: 'center',
alignItems: 'center',
opacity: 0.25,
},
text: {
fontFamily: font.lightItalic,
color: 'white',
},
})
export default NothingHere