Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3372127
D8522.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D8522.diff
View Options
diff --git a/native/roles/role-panel-entry.react.js b/native/roles/role-panel-entry.react.js
--- a/native/roles/role-panel-entry.react.js
+++ b/native/roles/role-panel-entry.react.js
@@ -1,9 +1,10 @@
// @flow
import * as React from 'react';
-import { View, Text } from 'react-native';
+import { View, Text, TouchableOpacity } from 'react-native';
import CommIcon from '../components/comm-icon.react.js';
+import SWMansionIcon from '../components/swmansion-icon.react.js';
import { useStyles } from '../themes/colors.js';
type RolePanelEntryProps = {
@@ -15,13 +16,31 @@
const { roleName, memberCount } = props;
const styles = useStyles(unboundStyles);
+ const menuButton = React.useMemo(() => {
+ if (roleName === 'Admins') {
+ return <View style={styles.rolePanelEmptyMenuButton} />;
+ }
+ return (
+ <TouchableOpacity>
+ <SWMansionIcon
+ name="menu-horizontal"
+ size={22}
+ style={styles.rolePanelMenuButton}
+ />
+ </TouchableOpacity>
+ );
+ }, [roleName, styles.rolePanelEmptyMenuButton, styles.rolePanelMenuButton]);
+
return (
<View style={styles.rolePanelEntry}>
<Text style={styles.rolePanelNameEntry}>{roleName}</Text>
- <Text style={styles.rolePanelCountEntry}>
- {memberCount}
- <CommIcon name="user-filled" size={14} />
- </Text>
+ <View style={styles.rolePanelCountEntryContainer}>
+ <Text style={styles.rolePanelCountEntry}>
+ {memberCount}
+ <CommIcon name="user-filled" size={14} />
+ </Text>
+ </View>
+ {menuButton}
</View>
);
}
@@ -34,17 +53,28 @@
padding: 8,
},
rolePanelNameEntry: {
+ flex: 1,
color: 'panelForegroundLabel',
fontWeight: '600',
fontSize: 14,
},
+ rolePanelCountEntryContainer: {
+ marginRight: 40,
+ alignItmes: 'flex-end',
+ },
rolePanelCountEntry: {
color: 'panelForegroundLabel',
fontWeight: '600',
fontSize: 14,
- marginRight: 72,
+ marginRight: 22,
padding: 8,
},
+ rolePanelEmptyMenuButton: {
+ marginRight: 22,
+ },
+ rolePanelMenuButton: {
+ color: 'panelForegroundLabel',
+ },
};
export default RolePanelEntry;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 27, 5:39 AM (22 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2588914
Default Alt Text
D8522.diff (2 KB)
Attached To
Mode
D8522: [native] Show a menu button next to each role except admins
Attached
Detach File
Event Timeline
Log In to Comment