UNPKG

nexle-tvguide-lib

Version:
46 lines (39 loc) 1.29 kB
import React from 'react'; import { View, Text, StyleSheet } from 'react-native'; import { TouchableOpacity } from 'react-native-tvfocus'; import { TV_GUIDE_CONSTANTS } from '../../constants'; export default class HeaderTimeCell extends React.Component { constructor(props) { super(props); } static defaultProps = { time: {}, } shouldComponentUpdate() { return false; } render() { const { time, timeLineItemWidth } = this.props; const { text } = time || ''; const styles = hourStyle; return ( <View style={[styles.contain, { width: timeLineItemWidth }]}> <Text style={styles.content}>{text}</Text> </View> ); } } const hourStyle = StyleSheet.create({ contain: { color: TV_GUIDE_CONSTANTS.THEME_STYLES.FUTURE_PROGRAM_TEXT_COLOR, backgroundColor: TV_GUIDE_CONSTANTS.THEME_STYLES.CONTAINER_BG_COLOR, height: TV_GUIDE_CONSTANTS.HEADER_CELL_HEIGHT, justifyContent: 'center', borderStartColor: 'white', }, content: { color: TV_GUIDE_CONSTANTS.THEME_STYLES.FUTURE_PROGRAM_TEXT_COLOR, fontSize: TV_GUIDE_CONSTANTS.THEME_STYLES.TIME_LINE_TITLE_FONT_SIZE, fontWeight: 'bold', }, });