Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32197741
D6001.1765104011.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D6001.1765104011.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 Icon from '@expo/vector-icons/Feather';
+import { useNavigation } from '@react-navigation/native';
+import * as React from 'react';
+import { TouchableOpacity, Text, View } from 'react-native';
+
+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
Sun, Dec 7, 10:40 AM (19 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5843175
Default Alt Text
D6001.1765104011.diff (1 KB)
Attached To
Mode
D6001: [native] Add subchannels button
Attached
Detach File
Event Timeline
Log In to Comment