Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3509627
D9381.id31726.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
D9381.id31726.diff
View Options
diff --git a/native/profile/relationship-list-item.react.js b/native/profile/relationship-list-item.react.js
--- a/native/profile/relationship-list-item.react.js
+++ b/native/profile/relationship-list-item.react.js
@@ -226,6 +226,7 @@
verticalBounds,
visibleEntryIDs: this.visibleEntryIDs(),
relativeUserInfo,
+ tooltipButtonIcon: 'pencil',
},
});
});
diff --git a/native/profile/user-relationship-tooltip-modal.react.js b/native/profile/user-relationship-tooltip-modal.react.js
--- a/native/profile/user-relationship-tooltip-modal.react.js
+++ b/native/profile/user-relationship-tooltip-modal.react.js
@@ -15,18 +15,23 @@
} from 'lib/utils/action-utils.js';
import PencilIcon from '../components/pencil-icon.react.js';
+import SWMansionIcon from '../components/swmansion-icon.react.js';
import type { AppNavigationProp } from '../navigation/app-navigator.react.js';
+import { useColors } from '../themes/colors.js';
import {
createTooltip,
type TooltipParams,
type BaseTooltipProps,
type TooltipMenuProps,
+ type TooltipRoute,
} from '../tooltip/tooltip.react.js';
import Alert from '../utils/alert.js';
type Action = 'unfriend' | 'block' | 'unblock';
+type TooltipButtonIcon = 'pencil' | 'menu';
export type UserRelationshipTooltipModalParams = TooltipParams<{
+ +tooltipButtonIcon: TooltipButtonIcon,
+relativeUserInfo: RelativeUserInfo,
}>;
@@ -124,19 +129,32 @@
type Props = {
+navigation: AppNavigationProp<'UserRelationshipTooltipModal'>,
+ +route: TooltipRoute<'UserRelationshipTooltipModal'>,
...
};
function UserRelationshipTooltipButton(props: Props): React.Node {
- const { navigation } = props;
+ const { navigation, route } = props;
const { goBackOnce } = navigation;
+ const { tooltipButtonIcon } = route.params;
+
+ const colors = useColors();
+
+ const icon = React.useMemo(() => {
+ if (tooltipButtonIcon === 'pencil') {
+ return <PencilIcon />;
+ }
+ return (
+ <SWMansionIcon
+ name="menu-vertical"
+ size={24}
+ color={colors.modalBackgroundLabel}
+ />
+ );
+ }, [colors.modalBackgroundLabel, tooltipButtonIcon]);
- return (
- <TouchableOpacity onPress={goBackOnce}>
- <PencilIcon />
- </TouchableOpacity>
- );
+ return <TouchableOpacity onPress={goBackOnce}>{icon}</TouchableOpacity>;
}
const UserRelationshipTooltipModal: React.ComponentType<
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 22, 6:56 AM (9 m, 29 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2690506
Default Alt Text
D9381.id31726.diff (2 KB)
Attached To
Mode
D9381: [native] introduce tooltipButtonIcon to UserRelationshipTooltipModalParams
Attached
Detach File
Event Timeline
Log In to Comment