react-bootstrap#ModalBody JavaScript Examples

The following examples show how to use react-bootstrap#ModalBody. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.jsx    From nightfall_3 with Creative Commons Zero v1.0 Universal 4 votes vote down vote up
TransferModal = ({ show, handleClose, transferValue, txType, triggerTx, setReadyTx }) => {
  return (
    <Modal contentClassName="modalFather" show={show} onHide={handleClose}>
      <Modal.Header closeButton>
        <div className="modalTitle">Confirm transaction</div>
          <div className="tokenDetails">
            <div className="tokenDetails__img">
              <img src={matic} alt="Token" />
            <TokenDetailsVal id="Bridge_modal_tokenAmount">

          {/* Buttons */}
                <span>{txType === 'deposit' ? 'Ethereum Mainnet' : 'Polygon Nightfall L2'}</span>
              <MdArrowForwardIos />
                <span>{txType === 'deposit' ? 'Polygon Nightfall L2' : 'Ethereum Mainnet'}</span>
          <Divider />
              <TransferModeTitleMain>Transfer Mode</TransferModeTitleMain>
                {txType === 'deposit' ? 'On-Chain' : 'Direct Transfer'}
              <span>Transfer security is provided by the Ethereum miners.</span>
                {' '}
                To minimise the risk of chain reorganisations, your transfer will wait for{' '}
              <span className="text-primary"> 12 block confirmations</span> before being finalised.
          <Divider />
              <EstimationFeeTitleMain>Estimated Nightfall Fee</EstimationFeeTitleMain>
            {txType === 'withdraw' ||
            (txType === 'deposit' &&
              ethereum.chainId === ChainIdMapping[process.env.REACT_APP_MODE].chainId) ? (
                onClick={async () => {
                  setReadyTx(await triggerTx());
                Create Transaction
            ) : (
                style={{ backgroundColor: 'grey' }}
                onClick={() => {
                  return ethereum.request({
                    method: 'wallet_switchEthereumChain',
                    params: [{ chainId: ChainIdMapping[process.env.REACT_APP_MODE].chainId }], // chainId must be in hexadecimal numbers
                Switch to {ChainIdMapping[process.env.REACT_APP_MODE].chainName} For Deposits.