Page MenuHomePhabricator

D5374.diff
No OneTemporary

D5374.diff

diff --git a/native/navigation/tooltip.react.js b/native/navigation/tooltip.react.js
--- a/native/navigation/tooltip.react.js
+++ b/native/navigation/tooltip.react.js
@@ -29,7 +29,9 @@
} from 'lib/utils/action-utils';
import { ChatContext, type ChatContextType } from '../chat/chat-context';
+import CommIcon from '../components/comm-icon.react';
import { SingleLine } from '../components/single-line.react';
+import SWMansionIcon from '../components/swmansion-icon.react';
import { type InputState, InputStateContext } from '../input/input-state';
import { type DimensionsInfo } from '../redux/dimensions-updater.react';
import { useSelector } from '../redux/redux-utils';
@@ -118,11 +120,34 @@
): React.ComponentType<BaseTooltipPropsType> {
class TooltipItem extends React.PureComponent<TooltipItemProps<RouteName>> {
render() {
+ let icon;
+ if (this.props.spec.id === 'copy') {
+ icon = <SWMansionIcon name="copy" style={styles.icon} size={16} />;
+ } else if (this.props.spec.id === 'reply') {
+ icon = <CommIcon name="reply" style={styles.icon} size={12} />;
+ } else if (this.props.spec.id === 'report') {
+ icon = (
+ <SWMansionIcon name="warning-circle" style={styles.icon} size={16} />
+ );
+ } else if (
+ this.props.spec.id === 'create_sidebar' ||
+ this.props.spec.id === 'open_sidebar'
+ ) {
+ icon = (
+ <SWMansionIcon
+ name="message-circle-lines"
+ style={styles.icon}
+ size={16}
+ />
+ );
+ }
+
return (
<TouchableOpacity
onPress={this.onPress}
style={[styles.itemContainer, this.props.containerStyle]}
>
+ {icon}
<SingleLine style={[styles.label, this.props.labelStyle]}>
{this.props.spec.text}
</SingleLine>
@@ -496,7 +521,14 @@
flex: 1,
overflow: 'hidden',
},
+ icon: {
+ marginRight: 4,
+ },
itemContainer: {
+ alignItems: 'center',
+ flex: 1,
+ flexDirection: 'row',
+ justifyContent: 'center',
padding: 10,
},
itemMargin: {

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 4:33 AM (18 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2568395
Default Alt Text
D5374.diff (2 KB)

Event Timeline