nexle-tvguide-lib
Version:
TV guide library for Android TV
22 lines (19 loc) • 677 B
JavaScript
import React from 'react';
import { StyleSheet, Image, PixelRatio } from 'react-native';
const defaultChannelLogo = require('../../assets/images/defaultChannelLogo.png');
const ChannelLogo = ({ asset, channelWidth }) => {
const width = channelWidth * 0.6;
const src = asset ? { uri: asset } : defaultChannelLogo;
return <Image source={src} style={[styles.channelLogo, { width }]} />;
};
export default React.memo(ChannelLogo);
const styles = StyleSheet.create({
channelLogo: {
height: '100%',
resizeMode: 'center',
alignSelf: 'center',
backgroundColor: 'transparent',
marginStart: 10,
marginEnd: 30,
},
});