2019-03-01 16:49:11 +00:00
|
|
|
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';
|
2019-03-01 16:49:11 +00:00
|
|
|
|
|
|
|
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-06-11 14:01:40 +00:00
|
|
|
|
2019-12-04 16:39:53 +00:00
|
|
|
const DisclosureIndicator = React.memo(({ theme }) => (
|
2019-03-01 16:49:11 +00:00
|
|
|
<View style={styles.disclosureContainer}>
|
2019-12-04 16:39:53 +00:00
|
|
|
<DisclosureImage theme={theme} />
|
2019-03-01 16:49:11 +00:00
|
|
|
</View>
|
|
|
|
));
|
2019-12-04 16:39:53 +00:00
|
|
|
DisclosureIndicator.propTypes = {
|
|
|
|
theme: PropTypes.string
|
|
|
|
};
|
2019-06-11 14:01:40 +00:00
|
|
|
|
2019-03-01 16:49:11 +00:00
|
|
|
export default DisclosureIndicator;
|