A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
add tooltip to bottom button
ammarahm-edfaf9af47c5db
diff --git a/apps/mobile/src/components/Container/ContainerBottomButton.js b/apps/mobile/src/components/Container/ContainerBottomButton.jsindex 47a298455..37cfb5395 100644--- a/apps/mobile/src/components/Container/ContainerBottomButton.js+++ b/apps/mobile/src/components/Container/ContainerBottomButton.js@@ -6,9 +6,10 @@ import Icon from 'react-native-vector-icons/MaterialCommunityIcons';import {notesnook} from '../../../e2e/test.ids';import {useTracked} from '../../provider';import {DDS} from '../../services/DeviceDetection';-import {getElevation, showContext} from '../../utils';+import {getElevation, showContext, showTooltip, TOOLTIP_POSITIONS} from '../../utils';import {normalize, SIZE} from '../../utils/SizeUtils';import {PressableButton} from '../PressableButton';+import RNTooltips from 'react-native-tooltips';const translateY = new Animated.Value(0);export const ContainerBottomButton = ({@@ -76,6 +77,9 @@ export const ContainerBottomButton = ({...getElevation(5),borderRadius: 100,}}+ onLongPress={(event) => {+ showTooltip(event,title,TOOLTIP_POSITIONS.LEFT)+ }}onPress={onPress}><Viewstyle={{diff --git a/apps/mobile/src/utils/index.js b/apps/mobile/src/utils/index.jsindex 6659a905f..15a5ffc12 100755--- a/apps/mobile/src/utils/index.js+++ b/apps/mobile/src/utils/index.js@@ -194,12 +194,21 @@ export function toTXT(data) {}, '');}-export function showTooltip(event, text) {+export const TOOLTIP_POSITIONS = {+ LEFT:1,+ RIGHT:2,+ TOP:3,+ BOTTOM:4+}+++export function showTooltip(event, text,position) {if (!event._targetInst?.ref?.current) return;RNTooltips.Show(event._targetInst.ref.current, tabBarRef.current, {text: text,tintColor: 'black',corner: 40,- textSize: 10,+ textSize: 12,+ position:position});}