diff --git a/__mocks__/reactotron-react-native.js b/__mocks__/reactotron-react-native.js new file mode 100644 index 000000000..9180fdfe5 --- /dev/null +++ b/__mocks__/reactotron-react-native.js @@ -0,0 +1,3 @@ +export default { + createSagaMonitor: () => {} +}; diff --git a/app/containers/DisclosureIndicator.js b/app/containers/DisclosureIndicator.js index 03bed9861..25a284baf 100644 --- a/app/containers/DisclosureIndicator.js +++ b/app/containers/DisclosureIndicator.js @@ -14,9 +14,12 @@ const styles = StyleSheet.create({ } }); +export const DisclosureImage = React.memo(() => ); + const DisclosureIndicator = React.memo(() => ( - + )); + export default DisclosureIndicator; diff --git a/app/containers/ListItem.js b/app/containers/ListItem.js new file mode 100644 index 000000000..069329343 --- /dev/null +++ b/app/containers/ListItem.js @@ -0,0 +1,93 @@ +import React from 'react'; +import { View, Text, StyleSheet } from 'react-native'; +import PropTypes from 'prop-types'; +import { RectButton } from 'react-native-gesture-handler'; + +import { COLOR_TEXT } from '../constants/colors'; +import sharedStyles from '../views/Styles'; + +const styles = StyleSheet.create({ + container: { + flex: 1, + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'center', + height: 56, + paddingHorizontal: 15 + }, + disabled: { + opacity: 0.3 + }, + textContainer: { + flex: 1, + justifyContent: 'center' + }, + title: { + fontSize: 16, + ...sharedStyles.textColorNormal, + ...sharedStyles.textRegular + }, + subtitle: { + fontSize: 14, + ...sharedStyles.textColorNormal, + ...sharedStyles.textRegular + } +}); + +const Content = React.memo(({ + title, subtitle, disabled, testID, right +}) => ( + + + {title} + {subtitle + ? {subtitle} + : null + } + + {right ? right() : null} + +)); + +const Button = React.memo(({ + onPress, ...props +}) => ( + + + +)); + +const Item = React.memo(({ ...props }) => { + if (props.onPress) { + return