Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3344279
D5374.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
D5374.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D5374: [native] added icons to tooltip item component
Attached
Detach File
Event Timeline
Log In to Comment