mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
fix actionSheet
This commit is contained in:
@@ -1,22 +1,18 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { View } from 'react-native';
|
import {View} from 'react-native';
|
||||||
import { Platform } from 'react-native';
|
import {Platform} from 'react-native';
|
||||||
import ActionSheet from 'react-native-actions-sheet';
|
import ActionSheet from 'react-native-actions-sheet';
|
||||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
import {useSafeAreaInsets} from 'react-native-safe-area-context';
|
||||||
import { useTracked } from '../../provider';
|
import {useTracked} from '../../provider';
|
||||||
import { DDS } from '../../services/DeviceDetection';
|
import {DDS} from '../../services/DeviceDetection';
|
||||||
import { editing } from '../../utils';
|
import {editing} from '../../utils';
|
||||||
import { hexToRGBA } from '../../utils/ColorUtils';
|
import {hexToRGBA} from '../../utils/ColorUtils';
|
||||||
import { sleep } from '../../utils/TimeUtils';
|
import {sleep} from '../../utils/TimeUtils';
|
||||||
import {
|
import {EditorWebView, textInput} from '../../views/Editor/Functions';
|
||||||
EditorWebView,
|
|
||||||
|
|
||||||
textInput
|
|
||||||
} from '../../views/Editor/Functions';
|
|
||||||
import tiny from '../../views/Editor/tiny/tiny';
|
import tiny from '../../views/Editor/tiny/tiny';
|
||||||
import { focusEditor } from '../../views/Editor/tiny/toolbar/constants';
|
import {focusEditor} from '../../views/Editor/tiny/toolbar/constants';
|
||||||
import { Toast } from '../Toast';
|
import {Toast} from '../Toast';
|
||||||
import { GetPremium } from './GetPremium';
|
import {GetPremium} from './GetPremium';
|
||||||
|
|
||||||
const ActionSheetWrapper = ({
|
const ActionSheetWrapper = ({
|
||||||
children,
|
children,
|
||||||
@@ -44,7 +40,7 @@ const ActionSheetWrapper = ({
|
|||||||
borderBottomLeftRadius: largeTablet ? 10 : 1,
|
borderBottomLeftRadius: largeTablet ? 10 : 1,
|
||||||
marginBottom: largeTablet ? 50 : 0,
|
marginBottom: largeTablet ? 50 : 0,
|
||||||
alignSelf: 'center',
|
alignSelf: 'center',
|
||||||
paddingTop: gestureEnabled ? 10 : 10,
|
paddingTop: 10,
|
||||||
};
|
};
|
||||||
}, [colors.bg, gestureEnabled]);
|
}, [colors.bg, gestureEnabled]);
|
||||||
|
|
||||||
@@ -71,8 +67,7 @@ const ActionSheetWrapper = ({
|
|||||||
return (
|
return (
|
||||||
<ActionSheet
|
<ActionSheet
|
||||||
ref={fwdRef}
|
ref={fwdRef}
|
||||||
hideUnderlay={true}
|
drawUnderStatusBar={false}
|
||||||
|
|
||||||
containerStyle={style}
|
containerStyle={style}
|
||||||
gestureEnabled={gestureEnabled}
|
gestureEnabled={gestureEnabled}
|
||||||
extraScroll={largeTablet ? 50 : 0}
|
extraScroll={largeTablet ? 50 : 0}
|
||||||
@@ -87,17 +82,17 @@ const ActionSheetWrapper = ({
|
|||||||
keyboardShouldPersistTaps="always"
|
keyboardShouldPersistTaps="always"
|
||||||
premium={
|
premium={
|
||||||
<>
|
<>
|
||||||
<Toast context="local" />
|
<Toast context="local" />
|
||||||
<GetPremium
|
<GetPremium
|
||||||
context="sheet"
|
context="sheet"
|
||||||
close={() => fwdRef?.current?.hide()}
|
close={() => fwdRef?.current?.hide()}
|
||||||
offset={50}
|
offset={50}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
onClose={_onClose}>
|
onClose={_onClose}>
|
||||||
{children}
|
{children}
|
||||||
<View style={{height:Platform.OS === "ios" ? insets.bottom/2 : 20}}/>
|
<View style={{height: Platform.OS === 'ios' ? insets.bottom / 2 : 20}} />
|
||||||
</ActionSheet>
|
</ActionSheet>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user