From fdeb34ff0a52570466d2be21b4d4fe292995f9f6 Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Fri, 17 Mar 2023 14:21:03 +0500 Subject: [PATCH] mobile: improve wording of delete notebook dialog --- apps/mobile/app/components/dialog/index.js | 33 +++++++- apps/mobile/app/utils/functions.js | 99 ++++++++++++---------- 2 files changed, 84 insertions(+), 48 deletions(-) diff --git a/apps/mobile/app/components/dialog/index.js b/apps/mobile/app/components/dialog/index.js index da92a300b..6dd9719d1 100644 --- a/apps/mobile/app/components/dialog/index.js +++ b/apps/mobile/app/components/dialog/index.js @@ -35,6 +35,7 @@ import BaseDialog from "./base-dialog"; import DialogButtons from "./dialog-buttons"; import DialogHeader from "./dialog-header"; import { useCallback } from "react"; +import { Button } from "../ui/button"; export const Dialog = ({ context = "global" }) => { const colors = useThemeStore((state) => state.colors); @@ -54,7 +55,11 @@ export const Dialog = ({ context = "global" }) => { input: false, inputPlaceholder: "Enter some text", defaultValue: "", - disableBackdropClosing: false + disableBackdropClosing: false, + check: { + info: "Check", + type: "transparent" + } }); useEffect(() => { @@ -87,6 +92,7 @@ export const Dialog = ({ context = "global" }) => { if (data.context !== context) return; setDialogInfo(data); setVisible(true); + setInputValue(data.defaultValue); }, [context] ); @@ -137,6 +143,9 @@ export const Dialog = ({ context = "global" }) => { paragraph={dialogInfo.paragraph} paragraphColor={dialogInfo.paragraphColor} padding={12} + style={{ + minHeight: 0 + }} /> @@ -163,6 +172,28 @@ export const Dialog = ({ context = "global" }) => { ) : null} + {dialogInfo.check ? ( + <> +