increase modal size

pull/5370/head
aniket-engg 6 months ago committed by Aniket
parent d58006e523
commit 5a09e6eb78
  1. 3
      libs/remix-ui/app/src/lib/remix-app/context/provider.tsx
  2. 1
      libs/remix-ui/app/src/lib/remix-app/interface/index.ts
  3. 1
      libs/remix-ui/app/src/lib/remix-app/reducer/modals.ts
  4. 2
      libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx
  5. 1
      libs/remix-ui/modal-dialog/src/lib/types/index.ts
  6. 7
      libs/remix-ui/run-tab/src/lib/components/universalDappUI.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,

@ -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,

@ -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,

@ -85,7 +85,7 @@ export const ModalDialog = (props: ModalDialogProps) => {
style={{ display: props.hide ? 'none' : 'block' }}
role="dialog"
>
<div className="modal-dialog" role="document">
<div className={'modal-dialog ' + (props.modalParentClass ? props.modalParentClass : '')} role="document">
<div
ref={modal}
tabIndex={-1}

@ -17,6 +17,7 @@ export interface ModalDialogProps {
cancelLabel?: string | JSX.Element,
cancelFn?: () => void,
modalClass?: string,
modalParentClass?: string
showCancelIcon?: boolean,
hide?: boolean,
handleHide: (hideState?: boolean) => void,

@ -279,7 +279,8 @@ export function UniversalDappUI(props: UdappProps) {
id: 'SolidityScanSuccess',
title: <FormattedMessage id="udapp.solScan.successModalTitle" />,
message: <SolScanTable scanDetails={scanDetails} />,
okLabel: 'Close'
okLabel: 'Close',
modalParentClass: 'modal-lg'
}
await props.plugin.call('notification', 'modal', modal)
}
@ -296,7 +297,7 @@ export function UniversalDappUI(props: UdappProps) {
message: <FormattedMessage id="udapp.solScan.modalMessage" />,
okLabel: <FormattedMessage id="udapp.solScan.modalOkLabel" />,
okFn: handleScanContinue,
cancelLabel: <FormattedMessage id="udapp.solScan.modalCancelLabel" />,
cancelLabel: <FormattedMessage id="udapp.solScan.modalCancelLabel" />
}
await props.plugin.call('notification', 'modal', modal)
@ -392,7 +393,7 @@ export function UniversalDappUI(props: UdappProps) {
></i>
</CustomTooltip>
)}
<CustomTooltip placement="top" tooltipClasses="text-nowrap" tooltipId="udapp_udappSolScanTooltip" tooltipText={<FormattedMessage id="udapp.tooltipTextSolScan" />}>
<CustomTooltip placement="top" tooltipClasses="text-nowrap" tooltipId="udapp_udappSolScanTooltip" tooltipText={<FormattedMessage id="udapp.solScan.iconTooltip" />}>
<i className="fas fa-qrcode btn btn-sm p-0" onClick={askPermissionToScan}></i>
</CustomTooltip>
</div>

Loading…
Cancel
Save