mirror of
https://github.com/balzack/databag.git
synced 2025-02-14 20:49:16 +00:00
rendering audio assets
This commit is contained in:
parent
86f3d155bb
commit
eb32ba9571
@ -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>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -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',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user