Skip to content

Commit

Permalink
increase modal size
Browse files Browse the repository at this point in the history
  • Loading branch information
Aniket-Engg committed Jun 5, 2024
1 parent 7ac7dcc commit 0c1b0f2
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion libs/remix-ui/app/src/lib/remix-app/context/provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -37,6 +37,7 @@ export const ModalProvider = ({ children = [], reducer = modalReducer, initialSt
cancelLabel,
cancelFn,
modalType: modalType || ModalTypes.default,
modalParentClass,
defaultValue: defaultValue,
hideFn,
resolve,
Expand Down
1 change: 1 addition & 0 deletions libs/remix-ui/app/src/lib/remix-app/interface/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions libs/remix-ui/app/src/lib/remix-app/reducer/modals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
1 change: 1 addition & 0 deletions libs/remix-ui/modal-dialog/src/lib/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 4 additions & 3 deletions libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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)
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit 0c1b0f2

Please sign in to comment.