Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3358845
D6001.id20031.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D6001.id20031.diff
View Options
diff --git a/native/navigation/subchannels-button.react.js b/native/navigation/subchannels-button.react.js
new file mode 100644
--- /dev/null
+++ b/native/navigation/subchannels-button.react.js
@@ -0,0 +1,63 @@
+// @flow
+
+import { useNavigation } from '@react-navigation/native';
+import * as React from 'react';
+import { TouchableOpacity, Text, View } from 'react-native';
+import Icon from 'react-native-vector-icons/Feather';
+
+import type { ThreadInfo } from 'lib/types/thread-types';
+
+import { useStyles } from '../themes/colors';
+import { SubchannelsListModalRouteName } from './route-names';
+
+type Props = {
+ +threadInfo: ThreadInfo,
+};
+
+function SubchnnelsButton(props: Props): React.Node {
+ const styles = useStyles(unboundStyles);
+
+ const { threadInfo } = props;
+ const { navigate } = useNavigation();
+
+ const onPress = React.useCallback(
+ () =>
+ navigate<'SubchannelsListModal'>({
+ name: SubchannelsListModalRouteName,
+ params: { threadInfo },
+ }),
+ [navigate, threadInfo],
+ );
+
+ return (
+ <TouchableOpacity style={styles.view} onPress={onPress}>
+ <View style={styles.iconWrapper}>
+ <Icon name="corner-down-right" style={styles.label} size={16} />
+ </View>
+ <Text style={styles.label}>Subchannels</Text>
+ </TouchableOpacity>
+ );
+}
+
+const unboundStyles = {
+ view: {
+ flexDirection: 'row',
+ },
+ label: {
+ color: 'drawerExpandButton',
+ fontWeight: '500',
+ fontSize: 12,
+ lineHeight: 18,
+ },
+ iconWrapper: {
+ height: 16,
+ width: 16,
+ alignItems: 'center',
+ },
+ icon: {
+ color: 'drawerExpandButton',
+ marginRight: 2,
+ },
+};
+
+export default SubchnnelsButton;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 6:25 AM (21 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2578703
Default Alt Text
D6001.id20031.diff (1 KB)
Attached To
Mode
D6001: [native] Add subchannels button
Attached
Detach File
Event Timeline
Log In to Comment