Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

make menu and drawer animatable

ammarahm-edf20e8234baee
diff --git a/apps/mobile/src/components/Container/index.js b/apps/mobile/src/components/Container/index.js
index cad020d26..08a5e7eee 100644
--- a/apps/mobile/src/components/Container/index.js
+++ b/apps/mobile/src/components/Container/index.js
@@ -1,23 +1,39 @@
import React from 'react';
import {KeyboardAvoidingView, Platform, SafeAreaView} from 'react-native';
+import Animated from 'react-native-reanimated';
import { useTracked } from '../../provider';
+import { getElevation } from '../../utils';
+import { ContainerScale } from '../../utils/Animations';
import SelectionHeader from '../SelectionHeader';
import {ContainerTopSection} from './ContainerTopSection';
-
+const AnimatedView = Animated.createAnimatedComponent(SafeAreaView);
export const Container = ({children, root}) => {
const [state] = useTracked();
const {colors, } = state;
return (
- <KeyboardAvoidingView behavior="padding" enabled={Platform.OS === 'ios'}>
- <SafeAreaView
+ <KeyboardAvoidingView behavior="padding" enabled={Platform.OS === 'ios'}
+ style={{
+ backgroundColor:colors.nav,
+ width:"100%",
+ height:"100%"
+ }}
+ >
+ <AnimatedView
style={{
height: '100%',
backgroundColor:colors.bg,
+ borderRadius:10,
+ overflow:"hidden",
+ transform:[
+ {
+ scale:ContainerScale
+ }
+ ]
}}>
<SelectionHeader />
<ContainerTopSection root={root} />
{children}
- </SafeAreaView>
+ </AnimatedView>
</KeyboardAvoidingView>
);
};