From 52bf75ef436320e798329d17f38f1330ae9df2cd Mon Sep 17 00:00:00 2001 From: Quang Manh Truong <106559523+manhtruongwang@users.noreply.github.com> Date: Mon, 10 Mar 2025 01:39:22 +0700 Subject: [PATCH 1/2] Update Toast.tsx to support padding for modal --- src/containers/Toast.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/containers/Toast.tsx b/src/containers/Toast.tsx index 7c267b4..94f192d 100644 --- a/src/containers/Toast.tsx +++ b/src/containers/Toast.tsx @@ -14,6 +14,7 @@ export type IConfigToast = { textBody?: string; titleStyle?: StyleProp; textBodyStyle?: StyleProp; + paddingTop?: number; onPress?: () => void; onShow?: () => void; onHide?: () => void; @@ -90,7 +91,7 @@ export class Toast extends React.Component { const { isDark, config: configGeneral } = this.props; return ( - {(insets) => } + {(insets) => } ); } From cad0b45278fa629505017c2e1a43bcb6ebd5b1a4 Mon Sep 17 00:00:00 2001 From: manhtruongwang Date: Mon, 10 Mar 2025 02:18:17 +0700 Subject: [PATCH 2/2] Rename package and update author information; enhance Dialog component with cancel and confirm button support --- README.md | 66 +++++++++++++++++++++++++++------------ package.json | 12 +++---- src/containers/Dialog.tsx | 51 ++++++++++++++++++++++++++++-- 3 files changed, 101 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index d6c6b0d..51fa92e 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,23 @@ -# react-native-alert-notification +# react-native-alert-dialog ## Example Dialog Box -| Theme Light | Theme Dark | -| :------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------: | -| Dialogs light | Dialogs Dark | +| Theme Light | Theme Dark | +| :-------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------: | +| Dialogs light | Dialogs Dark | ## Example Toast Notification -| Theme Light | Theme Dark | -| :----------------------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------: | -| toasts light | toasts Dark | +| Theme Light | Theme Dark | +| :-----------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------: | +| toasts light | toasts Dark | ## Installation ### - Installing: ```sh -yarn add react-native-alert-notification +yarn add react-native-alert-dialog ``` ### - Installing dependencies: @@ -43,7 +43,7 @@ import { ALERT_TYPE, Dialog, AlertNotificationRoot, Toast } from 'react-native-a - // dialog box + // dialog box with single button