Page MenuHomePhabricator

D9381.id31726.diff
No OneTemporary

D9381.id31726.diff

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

Mime Type
text/plain
Expires
Sun, Dec 22, 6:56 AM (5 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2690506
Default Alt Text
D9381.id31726.diff (2 KB)

Event Timeline