increase modal size

pull/4735/head
aniket-engg 6 months ago committed by Aniket
parent 636303656c
commit 33bfc8f5ef
  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 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) => { return new Promise((resolve, reject) => {
dispatch({ dispatch({
type: modalActionTypes.setModal, type: modalActionTypes.setModal,
@ -37,6 +37,7 @@ export const ModalProvider = ({ children = [], reducer = modalReducer, initialSt
cancelLabel, cancelLabel,
cancelFn, cancelFn,
modalType: modalType || ModalTypes.default, modalType: modalType || ModalTypes.default,
modalParentClass,
defaultValue: defaultValue, defaultValue: defaultValue,
hideFn, hideFn,
resolve, resolve,

@ -18,6 +18,7 @@ export interface AppModal {
cancelLabel?: string | JSX.Element cancelLabel?: string | JSX.Element
cancelFn?: () => void, cancelFn?: () => void,
modalType?: ModalTypes, modalType?: ModalTypes,
modalParentClass?: string
defaultValue?: string defaultValue?: string
hideFn?: () => void, hideFn?: () => void,
resolve?: (value?:any) => void, resolve?: (value?:any) => void,

@ -18,6 +18,7 @@ export const modalReducer = (state: ModalState = ModalInitialState, action: Moda
cancelLabel: action.payload.cancelLabel, cancelLabel: action.payload.cancelLabel,
cancelFn: action.payload.cancelFn, cancelFn: action.payload.cancelFn,
modalType: action.payload.modalType, modalType: action.payload.modalType,
modalParentClass: action.payload.modalParentClass,
defaultValue: action.payload.defaultValue, defaultValue: action.payload.defaultValue,
hideFn: action.payload.hideFn, hideFn: action.payload.hideFn,
resolve: action.payload.resolve, resolve: action.payload.resolve,

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

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

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

Loading…
Cancel
Save