2019-03-01 16:49:11 +00:00
|
|
|
import React from 'react';
|
2020-06-05 13:28:58 +00:00
|
|
|
import { View, StyleSheet } from 'react-native';
|
2019-12-04 16:39:53 +00:00
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
|
|
|
|
import { themes } from '../constants/colors';
|
2020-06-05 13:28:58 +00:00
|
|
|
import { CustomIcon } from '../lib/Icons';
|
2019-03-01 16:49:11 +00:00
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
disclosureContainer: {
|
|
|
|
marginLeft: 6,
|
|
|
|
marginRight: 9,
|
|
|
|
alignItems: 'center',
|
|
|
|
justifyContent: 'center'
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2019-12-04 16:39:53 +00:00
|
|
|
export const DisclosureImage = React.memo(({ theme }) => (
|
2020-06-05 13:28:58 +00:00
|
|
|
<CustomIcon
|
|
|
|
name='chevron-right'
|
2020-07-06 20:56:28 +00:00
|
|
|
color={themes[theme].auxiliaryText}
|
2020-06-05 13:28:58 +00:00
|
|
|
size={20}
|
2019-12-04 16:39:53 +00:00
|
|
|
/>
|
|
|
|
));
|
|
|
|
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;
|