mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 06:59:31 +01:00
hide bottom button on tablet mode
This commit is contained in:
@@ -1,16 +1,16 @@
|
|||||||
import React, { useEffect } from 'react';
|
import React, {useEffect} from 'react';
|
||||||
import { Keyboard, Platform, View } from 'react-native';
|
import {Keyboard, Platform, View} from 'react-native';
|
||||||
import Animated, { Easing } from 'react-native-reanimated';
|
import Animated, {Easing} from 'react-native-reanimated';
|
||||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
import {useSafeAreaInsets} from 'react-native-safe-area-context';
|
||||||
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||||
import { useTracked } from '../../provider';
|
import {useTracked} from '../../provider';
|
||||||
import { DDS } from '../../services/DeviceDetection';
|
import {DDS} from '../../services/DeviceDetection';
|
||||||
import { getElevation, showContext } from '../../utils';
|
import {getElevation, showContext} from '../../utils';
|
||||||
import { normalize, SIZE } from '../../utils/SizeUtils';
|
import {normalize, SIZE} from '../../utils/SizeUtils';
|
||||||
import { PressableButton } from '../PressableButton';
|
import {PressableButton} from '../PressableButton';
|
||||||
|
|
||||||
const translateY = new Animated.Value(0);
|
const translateY = new Animated.Value(0);
|
||||||
export const ContainerBottomButton = ({title, onPress, color}) => {
|
export const ContainerBottomButton = ({title, onPress, color,shouldShow =false}) => {
|
||||||
const [state] = useTracked();
|
const [state] = useTracked();
|
||||||
const {colors} = state;
|
const {colors} = state;
|
||||||
const insets = useSafeAreaInsets();
|
const insets = useSafeAreaInsets();
|
||||||
@@ -42,7 +42,7 @@ export const ContainerBottomButton = ({title, onPress, color}) => {
|
|||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return DDS.isLargeTablet() && !shouldShow ? null : (
|
||||||
<Animated.View
|
<Animated.View
|
||||||
style={{
|
style={{
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
|
|||||||
Reference in New Issue
Block a user