vn-verdnaturachat/app/views/RoomsListView/ListHeader/Directory.js

41 lines
1.2 KiB
JavaScript
Raw Normal View History

import React from 'react';
2019-12-04 16:39:53 +00:00
import { View, Text, StyleSheet } from 'react-native';
import PropTypes from 'prop-types';
2019-12-04 16:39:53 +00:00
import Touch from '../../../utils/touch';
import { CustomIcon } from '../../../lib/Icons';
import I18n from '../../../i18n';
import styles from '../styles';
import DisclosureIndicator from '../../../containers/DisclosureIndicator';
2019-12-04 16:39:53 +00:00
import { themes } from '../../../constants/colors';
import { withTheme } from '../../../theme';
2019-12-04 16:39:53 +00:00
const Directory = React.memo(({ goDirectory, theme }) => {
const color = { color: themes[theme].headerSecondaryText };
return (
<Touch
onPress={goDirectory}
theme={theme}
style={{ backgroundColor: themes[theme].headerSecondaryBackground }}
>
<View
style={[
styles.dropdownContainerHeader,
{ borderBottomWidth: StyleSheet.hairlineWidth, borderColor: themes[theme].separatorColor }
]}
>
<CustomIcon style={[styles.directoryIcon, color]} size={22} name='discover' />
<Text style={[styles.directoryText, color]}>{I18n.t('Directory')}</Text>
<DisclosureIndicator theme={theme} />
</View>
</Touch>
);
});
Directory.propTypes = {
2019-12-04 16:39:53 +00:00
goDirectory: PropTypes.func,
theme: PropTypes.string
};
2019-12-04 16:39:53 +00:00
export default withTheme(Directory);