From fbcfbfc12c2b4deaab47560d84c3e75ffd4d32d8 Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Sat, 4 Feb 2023 12:25:16 +0500 Subject: [PATCH] mobile: reminder improvements 1. Set default title/description 2. Multiline reminder description input --- .../app/components/sheets/reminder/index.tsx | 24 ++++++++++++++++--- apps/mobile/app/components/ui/input/index.tsx | 5 +++- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/apps/mobile/app/components/sheets/reminder/index.tsx b/apps/mobile/app/components/sheets/reminder/index.tsx index 720b61839..3051f9ac4 100644 --- a/apps/mobile/app/components/sheets/reminder/index.tsx +++ b/apps/mobile/app/components/sheets/reminder/index.tsx @@ -46,6 +46,7 @@ import SettingsService from "../../../services/settings"; import { useRelationStore } from "../../../stores/use-relation-store"; import { ReminderTime } from "../../ui/reminder-time"; import Paragraph from "../../ui/typography/paragraph"; +import { NoteType } from "../../../utils/types"; type ReminderSheetProps = { actionSheetRef: RefObject; @@ -119,6 +120,10 @@ export default function ReminderSheet({ const details = useRef(reminder?.description); const titleRef = useRef(null); const { height } = useWindowDimensions(); + const referencedItem = reference + ? (db.notes?.note(reference.id)?.data as NoteType) + : null; + const showDatePicker = () => { setDatePickerVisibility(true); }; @@ -235,17 +240,30 @@ export default function ReminderSheet({ > (title.current = text)} containerStyle={{ borderWidth: 0, borderBottomWidth: 1 }} /> (details.current = text)} - containerStyle={{ borderWidth: 0, borderBottomWidth: 1 }} + containerStyle={{ + borderWidth: 0, + borderBottomWidth: 1, + maxHeight: 80, + marginTop: 10 + }} + multiline + inputStyle={{ + height: 80 + }} + height={80} + wrapperStyle={{ + marginBottom: 20 + }} /> { const colors = useThemeStore((state) => state.colors); @@ -236,7 +238,8 @@ const Input = ({ marginBottom: marginBottom, flexGrow: flexGrow, maxHeight: height, - marginRight: marginRight + marginRight: marginRight, + ...wrapperStyle }} >