align to center

This commit is contained in:
ammarahm-ed
2020-12-31 12:01:14 +05:00
parent 156ac794b3
commit 6d78b0521a

View File

@@ -1,51 +1,53 @@
import React, { useEffect, useState } from 'react';
import React, {useEffect, useState} from 'react';
import {
ActivityIndicator,
Clipboard,
Dimensions, Keyboard, ScrollView, TouchableOpacity,
View
Dimensions,
InteractionManager,
Keyboard,
ScrollView,
TouchableOpacity,
View,
} from 'react-native';
import Share from 'react-native-share';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import { notesnook } from '../../../e2e/test.ids';
import { useTracked } from '../../provider';
import { Actions } from '../../provider/Actions';
import { DDS } from '../../services/DeviceDetection';
import {notesnook} from '../../../e2e/test.ids';
import {useTracked} from '../../provider';
import {Actions} from '../../provider/Actions';
import {DDS} from '../../services/DeviceDetection';
import {
eSendEvent,
openVault,
sendNoteEditedEvent,
ToastEvent
ToastEvent,
} from '../../services/EventManager';
import PremiumService from '../../services/PremiumService';
import Sync from '../../services/Sync';
import { editing, toTXT } from '../../utils';
import {editing, toTXT} from '../../utils';
import {
ACCENT,
COLOR_SCHEME,
COLOR_SCHEME_DARK,
COLOR_SCHEME_LIGHT,
setColorScheme
setColorScheme,
} from '../../utils/Colors';
import { db } from '../../utils/DB';
import {db} from '../../utils/DB';
import {
eOnNewTopicAdded,
eOpenMoveNoteDialog,
refreshNotesPage
refreshNotesPage,
} from '../../utils/Events';
import { deleteItems } from '../../utils/functions';
import { MMKV } from '../../utils/mmkv';
import { opacity, pv, SIZE } from '../../utils/SizeUtils';
import { timeConverter } from '../../utils/TimeUtils';
import { PremiumTag } from '../Premium/PremiumTag';
import { PressableButton } from '../PressableButton';
import { Toast } from '../Toast';
import {deleteItems} from '../../utils/functions';
import {MMKV} from '../../utils/mmkv';
import {opacity, pv, SIZE} from '../../utils/SizeUtils';
import {timeConverter} from '../../utils/TimeUtils';
import {PremiumTag} from '../Premium/PremiumTag';
import {PressableButton} from '../PressableButton';
import {Toast} from '../Toast';
import Heading from '../Typography/Heading';
import Paragraph from '../Typography/Paragraph';
import { ActionSheetColorsSection } from './ActionSheetColorsSection';
import { ActionSheetTagsSection } from './ActionSheetTagsSection';
import {ActionSheetColorsSection} from './ActionSheetColorsSection';
import {ActionSheetTagsSection} from './ActionSheetTagsSection';
const w = Dimensions.get('window').width;
export const ActionSheetComponent = ({
@@ -61,7 +63,6 @@ export const ActionSheetComponent = ({
const {colors, premiumUser, user} = state;
const [refreshing, setRefreshing] = useState(false);
const [isPinnedToMenu, setIsPinnedToMenu] = useState(false);
const [note, setNote] = useState(
item
? item
@@ -191,12 +192,13 @@ export const ActionSheetComponent = ({
name: 'Delete',
icon: 'delete',
func: async () => {
close();
try {
await deleteItems(note);
} catch (e) {
console.log(e);
}
//close();
},
},
{
@@ -486,7 +488,6 @@ export const ActionSheetComponent = ({
};
const onScrollEnd = () => {
getRef().current?.handleChildScrollEnd();
};
@@ -519,7 +520,7 @@ export const ActionSheetComponent = ({
}}
/>
{!note.id && !note.dateCreated ? (
<Paragraph style={{marginVertical: 10}}>
<Paragraph style={{marginVertical: 10,alignSelf:"center"}}>
Start writing to save your note.
</Paragraph>
) : (
@@ -698,7 +699,7 @@ export const ActionSheetComponent = ({
note.notebooks?.length > 0 &&
note?.notebooks?.findIndex(
(o) => o.topics.indexOf(editing.actionAfterFirstSave.id) > -1,
) > -1 ? (
) > -1 ? (
<PressableButton
type="accent"
accentColor="red"