From b81cc178b5f0dfcbf67789f579fdc067b77288ca Mon Sep 17 00:00:00 2001 From: Ammar Ahmed Date: Fri, 27 Jun 2025 12:56:50 +0500 Subject: [PATCH] mobile: make add-reminder sheet a screen --- .../components/container/floating-button.tsx | 1 + .../app/components/dialog/dialog-header.tsx | 15 +- .../components/list-items/reminder/index.tsx | 22 +-- .../sheets/relations-list/index.tsx | 14 +- apps/mobile/app/hooks/use-actions.tsx | 30 ++-- apps/mobile/app/hooks/use-app-events.tsx | 6 +- .../app/navigation/navigation-stack.tsx | 12 +- .../add-reminder}/index.tsx | 150 +++++++----------- .../editor/tiptap/use-editor-events.tsx | 10 +- apps/mobile/app/screens/reminders/index.tsx | 10 +- apps/mobile/app/services/intent.ts | 6 +- apps/mobile/app/services/navigation.ts | 3 +- .../mobile/app/stores/use-navigation-store.ts | 4 + 13 files changed, 125 insertions(+), 158 deletions(-) rename apps/mobile/app/{components/sheets/reminder => screens/add-reminder}/index.tsx (86%) diff --git a/apps/mobile/app/components/container/floating-button.tsx b/apps/mobile/app/components/container/floating-button.tsx index a0d3ad52d..65a357caf 100644 --- a/apps/mobile/app/components/container/floating-button.tsx +++ b/apps/mobile/app/components/container/floating-button.tsx @@ -36,6 +36,7 @@ import { getElevationStyle } from "../../utils/elevation"; import { AppFontSize, normalize } from "../../utils/size"; import { DefaultAppStyles } from "../../utils/styles"; import { hexToRGBA, RGB_Linear_Shade } from "../../utils/colors"; +import useKeyboard from "../../hooks/use-keyboard"; interface FloatingButtonProps { onPress: () => void; diff --git a/apps/mobile/app/components/dialog/dialog-header.tsx b/apps/mobile/app/components/dialog/dialog-header.tsx index 509e31686..311da4630 100644 --- a/apps/mobile/app/components/dialog/dialog-header.tsx +++ b/apps/mobile/app/components/dialog/dialog-header.tsx @@ -21,7 +21,7 @@ import React from "react"; import { Text, View, ViewStyle } from "react-native"; import { useThemeColors } from "@notesnook/theme"; import { AppFontSize } from "../../utils/size"; -import { Button } from "../ui/button"; +import { Button, ButtonProps } from "../ui/button"; import { PressableProps } from "../ui/pressable"; import Heading from "../ui/typography/heading"; import Paragraph from "../ui/typography/paragraph"; @@ -31,13 +31,7 @@ type DialogHeaderProps = { icon?: string; title?: string; paragraph?: string; - button?: { - onPress?: () => void; - loading?: boolean; - title?: string; - type?: PressableProps["type"]; - icon?: string; - }; + button?: ButtonProps; paragraphColor?: string; padding?: number; centered?: boolean; @@ -95,17 +89,14 @@ const DialogHeader = ({ {button ? (