rendering audio assets

This commit is contained in:
Roland Osborne 2022-10-05 11:05:36 -07:00
parent 86f3d155bb
commit eb32ba9571
2 changed files with 36 additions and 3 deletions

View File

@ -1,6 +1,21 @@
import { Text } from 'react-native';
import { View, Text, Image, TouchableOpacity } from 'react-native';
import { styles } from './AudioThumb.styled';
import Colors from 'constants/Colors';
import audio from 'images/audio.png';
export function AudioThumb({ topicId, asset }) {
return (
<TouchableOpacity activeOpacity={1}>
<Image source={audio} style={{ borderRadius: 4, width: 92, height: 92, marginRight: 16, backgroundColor: Colors.lightgrey }} resizeMode={'cover'} />
{ asset.label && (
<View style={styles.overlay}>
<Text style={styles.label}>{ asset.label }</Text>
</View>
)}
</TouchableOpacity>
);
export function AudioThumb() {
return <Text>AUDIO</Text>
}

View File

@ -0,0 +1,18 @@
import { StyleSheet } from 'react-native';
import { Colors } from 'constants/Colors';
export const styles = StyleSheet.create({
overlay: {
top: 0,
width: '100%',
display: 'flex',
alignItems: 'center',
position: 'absolute',
paddingRight: 16,
maxHeight: 50,
},
label: {
textOverlay: 'center',
},
})