|
|
@@ -8,6 +8,7 @@ import { ColorPalette } from '../../../styles';
|
|
8
|
8
|
import type { Item } from '../../Types';
|
|
9
|
9
|
|
|
10
|
10
|
import AvatarListItem from './AvatarListItem';
|
|
|
11
|
+import Container from './Container';
|
|
11
|
12
|
import Text from './Text';
|
|
12
|
13
|
import styles from './styles';
|
|
13
|
14
|
|
|
|
@@ -92,6 +93,24 @@ export default class NavigateSectionListItem extends Component<Props> {
|
|
92
|
93
|
return lines && lines.length ? lines.map(this._renderItemLine) : null;
|
|
93
|
94
|
}
|
|
94
|
95
|
|
|
|
96
|
+ /**
|
|
|
97
|
+ * Renders the secondary action label.
|
|
|
98
|
+ *
|
|
|
99
|
+ * @private
|
|
|
100
|
+ * @returns {React$Node}
|
|
|
101
|
+ */
|
|
|
102
|
+ _renderSecondaryAction() {
|
|
|
103
|
+ const { secondaryAction } = this.props;
|
|
|
104
|
+
|
|
|
105
|
+ return (
|
|
|
106
|
+ <Container
|
|
|
107
|
+ onClick = { secondaryAction }
|
|
|
108
|
+ style = { styles.secondaryActionContainer }>
|
|
|
109
|
+ <Text style = { styles.secondaryActionLabel }>+</Text>
|
|
|
110
|
+ </Container>
|
|
|
111
|
+ );
|
|
|
112
|
+ }
|
|
|
113
|
+
|
|
95
|
114
|
/**
|
|
96
|
115
|
* Renders the content of this component.
|
|
97
|
116
|
*
|
|
|
@@ -124,7 +143,10 @@ export default class NavigateSectionListItem extends Component<Props> {
|
|
124
|
143
|
right = { right }>
|
|
125
|
144
|
<AvatarListItem
|
|
126
|
145
|
item = { item }
|
|
127
|
|
- onPress = { this.props.onPress } />
|
|
|
146
|
+ onPress = { this.props.onPress } >
|
|
|
147
|
+ { this.props.secondaryAction
|
|
|
148
|
+ && this._renderSecondaryAction() }
|
|
|
149
|
+ </AvatarListItem>
|
|
128
|
150
|
</Swipeout>
|
|
129
|
151
|
);
|
|
130
|
152
|
}
|