2021-09-13 20:41:05 +00:00
|
|
|
import React from 'react';
|
|
|
|
import { Text } from 'react-native';
|
|
|
|
|
|
|
|
import styles from './styles';
|
2022-04-07 14:10:03 +00:00
|
|
|
import { themes } from '../../lib/constants';
|
2022-04-20 21:37:54 +00:00
|
|
|
import { ITitleProps } from './interfaces';
|
2021-09-13 20:41:05 +00:00
|
|
|
|
2022-04-20 21:37:54 +00:00
|
|
|
const Title = React.memo(({ name, theme, hideUnreadStatus, alert }: ITitleProps) => (
|
2021-09-13 20:41:05 +00:00
|
|
|
<Text
|
|
|
|
style={[styles.title, alert && !hideUnreadStatus && styles.alert, { color: themes[theme].titleText }]}
|
|
|
|
ellipsizeMode='tail'
|
|
|
|
numberOfLines={1}>
|
|
|
|
{name}
|
|
|
|
</Text>
|
|
|
|
));
|
|
|
|
|
|
|
|
export default Title;
|