Rocket.Chat.ReactNative/app/containers/DisclosureIndicator.js

40 lines
886 B
JavaScript
Raw Normal View History

import React from 'react';
import { View, Image, StyleSheet } from 'react-native';
2019-12-04 16:39:53 +00:00
import PropTypes from 'prop-types';
import { themes } from '../constants/colors';
const styles = StyleSheet.create({
disclosureContainer: {
marginLeft: 6,
marginRight: 9,
alignItems: 'center',
justifyContent: 'center'
},
disclosureIndicator: {
width: 20,
height: 20
}
});
2019-12-04 16:39:53 +00:00
export const DisclosureImage = React.memo(({ theme }) => (
<Image
source={{ uri: 'disclosure_indicator' }}
style={[styles.disclosureIndicator, { tintColor: themes[theme].auxiliaryTintColor }]}
/>
));
DisclosureImage.propTypes = {
theme: PropTypes.string
};
2019-12-04 16:39:53 +00:00
const DisclosureIndicator = React.memo(({ theme }) => (
<View style={styles.disclosureContainer}>
2019-12-04 16:39:53 +00:00
<DisclosureImage theme={theme} />
</View>
));
2019-12-04 16:39:53 +00:00
DisclosureIndicator.propTypes = {
theme: PropTypes.string
};
export default DisclosureIndicator;