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
ui: add bouncing animation in actionsheet
ammarahm-edc94674228ec5
diff --git a/apps/mobile/src/components/ActionSheetComponent/ActionSheetWrapper.js b/apps/mobile/src/components/ActionSheetComponent/ActionSheetWrapper.jsindex e55721031..f7699e5e9 100644--- a/apps/mobile/src/components/ActionSheetComponent/ActionSheetWrapper.js+++ b/apps/mobile/src/components/ActionSheetComponent/ActionSheetWrapper.js@@ -4,13 +4,10 @@ import ActionSheet from 'react-native-actions-sheet';import { useSafeAreaInsets } from 'react-native-safe-area-context';import { useTracked } from '../../provider';import { useSettingStore } from '../../provider/stores';-import { editing } from '../../utils';import { hexToRGBA } from '../../utils/ColorUtils';-import { sleep } from '../../utils/TimeUtils';-import { EditorWebView, textInput } from '../../views/Editor/Functions';-import tiny from '../../views/Editor/tiny/tiny';-import { focusEditor, reFocusEditor } from '../../views/Editor/tiny/toolbar/constants';+import { reFocusEditor } from '../../views/Editor/tiny/toolbar/constants';import { Toast } from '../Toast';+import { BouncingView } from './BouncingView';import { GetPremium } from './GetPremium';const ActionSheetWrapper = ({@@ -88,8 +85,10 @@ const ActionSheetWrapper = ({</>}onClose={_onClose}>- {children}- <View style={{height: Platform.OS === 'ios' ? insets.bottom / 2 : 0}} />+ <BouncingView>+ {children}+ <View style={{height: Platform.OS === 'ios' ? insets.bottom / 2 : 0}} />+ </BouncingView></ActionSheet>);};diff --git a/apps/mobile/src/components/ActionSheetComponent/BouncingView.js b/apps/mobile/src/components/ActionSheetComponent/BouncingView.jsnew file mode 100644index 000000000..4a4dfc4d2--- /dev/null+++ b/apps/mobile/src/components/ActionSheetComponent/BouncingView.js@@ -0,0 +1,31 @@+import React, { useEffect } from 'react';+import Animated, { Easing, timing } from 'react-native-reanimated';++export const BouncingView = ({children}) => {+ const scale = Animated.useValue(0.9);++ useEffect(() => {+ scale.setValue(0.9);+ timing(scale, {+ toValue: 1,+ duration: 600,+ easing: Easing.elastic(1)+ }).start();+ return () => {+ scale.setValue(0.9);+ }+ },[])++ return (+ <Animated.View+ style={{+ transform: [+ {+ scale: scale+ }+ ]+ }}>+ {children}+ </Animated.View>+ );+};