From 33bfc8f5ef772a96d00e4f0037f3c38d0eb357a8 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Wed, 5 Jun 2024 20:25:00 +0530 Subject: [PATCH] increase modal size --- libs/remix-ui/app/src/lib/remix-app/context/provider.tsx | 3 ++- libs/remix-ui/app/src/lib/remix-app/interface/index.ts | 1 + libs/remix-ui/app/src/lib/remix-app/reducer/modals.ts | 1 + .../modal-dialog/src/lib/remix-ui-modal-dialog.tsx | 2 +- libs/remix-ui/modal-dialog/src/lib/types/index.ts | 1 + .../run-tab/src/lib/components/universalDappUI.tsx | 7 ++++--- 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/libs/remix-ui/app/src/lib/remix-app/context/provider.tsx b/libs/remix-ui/app/src/lib/remix-app/context/provider.tsx index 5b64e8e5f6..c6dc3d057b 100644 --- a/libs/remix-ui/app/src/lib/remix-app/context/provider.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/context/provider.tsx @@ -23,7 +23,7 @@ export const ModalProvider = ({ children = [], reducer = modalReducer, initialSt } const modal = (modalData: AppModal) => { - const { id, title, message, validationFn, okLabel, okFn, cancelLabel, cancelFn, modalType, defaultValue, hideFn, data } = modalData + const { id, title, message, validationFn, okLabel, okFn, cancelLabel, cancelFn, modalType, modalParentClass, defaultValue, hideFn, data } = modalData return new Promise((resolve, reject) => { dispatch({ type: modalActionTypes.setModal, @@ -37,6 +37,7 @@ export const ModalProvider = ({ children = [], reducer = modalReducer, initialSt cancelLabel, cancelFn, modalType: modalType || ModalTypes.default, + modalParentClass, defaultValue: defaultValue, hideFn, resolve, diff --git a/libs/remix-ui/app/src/lib/remix-app/interface/index.ts b/libs/remix-ui/app/src/lib/remix-app/interface/index.ts index 17afcc9e35..5dacecdf4d 100644 --- a/libs/remix-ui/app/src/lib/remix-app/interface/index.ts +++ b/libs/remix-ui/app/src/lib/remix-app/interface/index.ts @@ -18,6 +18,7 @@ export interface AppModal { cancelLabel?: string | JSX.Element cancelFn?: () => void, modalType?: ModalTypes, + modalParentClass?: string defaultValue?: string hideFn?: () => void, resolve?: (value?:any) => void, diff --git a/libs/remix-ui/app/src/lib/remix-app/reducer/modals.ts b/libs/remix-ui/app/src/lib/remix-app/reducer/modals.ts index 4578170385..a24c8af6aa 100644 --- a/libs/remix-ui/app/src/lib/remix-app/reducer/modals.ts +++ b/libs/remix-ui/app/src/lib/remix-app/reducer/modals.ts @@ -18,6 +18,7 @@ export const modalReducer = (state: ModalState = ModalInitialState, action: Moda cancelLabel: action.payload.cancelLabel, cancelFn: action.payload.cancelFn, modalType: action.payload.modalType, + modalParentClass: action.payload.modalParentClass, defaultValue: action.payload.defaultValue, hideFn: action.payload.hideFn, resolve: action.payload.resolve, diff --git a/libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx b/libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx index d7e966dcc7..fbeaafe439 100644 --- a/libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx +++ b/libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx @@ -85,7 +85,7 @@ export const ModalDialog = (props: ModalDialogProps) => { style={{ display: props.hide ? 'none' : 'block' }} role="dialog" > -
+
void, modalClass?: string, + modalParentClass?: string showCancelIcon?: boolean, hide?: boolean, handleHide: (hideState?: boolean) => void, diff --git a/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx b/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx index 9b24d8e725..ca2cfd9cac 100644 --- a/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx @@ -279,7 +279,8 @@ export function UniversalDappUI(props: UdappProps) { id: 'SolidityScanSuccess', title: , message: , - okLabel: 'Close' + okLabel: 'Close', + modalParentClass: 'modal-lg' } await props.plugin.call('notification', 'modal', modal) } @@ -296,7 +297,7 @@ export function UniversalDappUI(props: UdappProps) { message: , okLabel: , okFn: handleScanContinue, - cancelLabel: , + cancelLabel: } await props.plugin.call('notification', 'modal', modal) @@ -392,7 +393,7 @@ export function UniversalDappUI(props: UdappProps) { > )} - }> + }>