mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
do not animate bottom button when keyboard opens
This commit is contained in:
@@ -11,17 +11,15 @@ import {normalize, SIZE} from '../../utils/SizeUtils';
|
||||
import {PressableButton} from '../PressableButton';
|
||||
import RNTooltips from 'react-native-tooltips';
|
||||
|
||||
const translateY = new Animated.Value(0);
|
||||
//const translateY = new Animated.Value(0);
|
||||
export const ContainerBottomButton = ({
|
||||
title,
|
||||
onPress,
|
||||
color = 'accent',
|
||||
shouldShow = false,
|
||||
}) => {
|
||||
const [state] = useTracked();
|
||||
const {colors} = state;
|
||||
const insets = useSafeAreaInsets();
|
||||
|
||||
/*
|
||||
function animate(translate) {
|
||||
Animated.timing(translateY, {
|
||||
toValue: translate,
|
||||
@@ -48,7 +46,7 @@ export const ContainerBottomButton = ({
|
||||
Keyboard.removeListener('keyboardDidHide', onKeyboardHide);
|
||||
};
|
||||
}, []);
|
||||
|
||||
*/
|
||||
return DDS.isLargeTablet() && !shouldShow ? null : (
|
||||
<Animated.View
|
||||
style={{
|
||||
@@ -59,14 +57,14 @@ export const ContainerBottomButton = ({
|
||||
? insets.bottom - 10
|
||||
: insets.bottom + 12,
|
||||
zIndex: 10,
|
||||
transform: [
|
||||
/* transform: [
|
||||
{
|
||||
translateY: translateY,
|
||||
},
|
||||
{
|
||||
translateX: translateY,
|
||||
},
|
||||
],
|
||||
], */
|
||||
}}>
|
||||
<PressableButton
|
||||
testID={notesnook.ids.default.addBtn}
|
||||
|
||||
Reference in New Issue
Block a user