mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
add a remove button
This commit is contained in:
@@ -10,16 +10,17 @@ import {
|
|||||||
eSubscribeEvent,
|
eSubscribeEvent,
|
||||||
eUnSubscribeEvent,
|
eUnSubscribeEvent,
|
||||||
sendNoteEditedEvent,
|
sendNoteEditedEvent,
|
||||||
ToastEvent
|
ToastEvent,
|
||||||
} from '../../services/EventManager';
|
} from '../../services/EventManager';
|
||||||
import {db} from '../../utils/DB';
|
import {db} from '../../utils/DB';
|
||||||
import {
|
import {
|
||||||
eOnNewTopicAdded,
|
eOnNewTopicAdded,
|
||||||
eOpenMoveNoteDialog,
|
eOpenMoveNoteDialog,
|
||||||
refreshNotesPage
|
refreshNotesPage,
|
||||||
} from '../../utils/Events';
|
} from '../../utils/Events';
|
||||||
import {pv, SIZE} from '../../utils/SizeUtils';
|
import {pv, SIZE} from '../../utils/SizeUtils';
|
||||||
import ActionSheetWrapper from '../ActionSheetComponent/ActionSheetWrapper';
|
import ActionSheetWrapper from '../ActionSheetComponent/ActionSheetWrapper';
|
||||||
|
import {Button} from '../Button';
|
||||||
import DialogHeader from '../Dialog/dialog-header';
|
import DialogHeader from '../Dialog/dialog-header';
|
||||||
import {PressableButton} from '../PressableButton';
|
import {PressableButton} from '../PressableButton';
|
||||||
import {Toast} from '../Toast';
|
import {Toast} from '../Toast';
|
||||||
@@ -432,9 +433,21 @@ const MoveNoteComponent = ({close, note, setNote}) => {
|
|||||||
{note?.notebooks?.findIndex(
|
{note?.notebooks?.findIndex(
|
||||||
(o) => o.topics.indexOf(item.id) > -1,
|
(o) => o.topics.indexOf(item.id) > -1,
|
||||||
) > -1 ? (
|
) > -1 ? (
|
||||||
<Paragraph size={SIZE.sm} color={colors.errorText}>
|
<Button
|
||||||
Remove Note
|
onPress={() => handlePress(item, index)}
|
||||||
</Paragraph>
|
title="Remove Note"
|
||||||
|
type="accent"
|
||||||
|
accentColor="red"
|
||||||
|
height={22}
|
||||||
|
style={{
|
||||||
|
margin: 1,
|
||||||
|
marginRight: 5,
|
||||||
|
paddingHorizontal: 0,
|
||||||
|
paddingVertical: 2.5,
|
||||||
|
borderRadius: 100,
|
||||||
|
paddingHorizontal: 12,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
</PressableButton>
|
</PressableButton>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user