CDP Frontend SDK
    Preparing search index...

    Function unstable_FundModal

    • A fund modal component that wraps the Fund component.

      Parameters

      Returns Element

      The FundModal component.

      function App() {
      // Render the FundModal component
      const fetchBuyQuote: FundProps["fetchBuyQuote"] = async (params) => {
      // call the buy quote API
      }
      const fetchBuyOptions: FundProps["fetchBuyOptions"] = async params => {
      // call the buy options API
      }
      return (
      <CDPReactProvider config={cdpConfig} app={appConfig} theme={themeOverrides}>
      <FundModal
      country="US"
      subdivision="NY"
      cryptoCurrency="ETH"
      fiatCurrency="USD"
      fetchBuyQuote={fetchBuyQuote}
      fetchBuyOptions={fetchBuyOptions}
      network="base"
      presetAmountInputs={[10, 25, 50]}
      />
      </CDPReactProvider>
      );
      }
      function App() {
      // Render the FundModal component with a custom trigger button
      const fetchBuyQuote: FundProps["fetchBuyQuote"] = async (params) => {
      // call the buy quote API
      }
      const fetchBuyOptions: FundProps["fetchBuyOptions"] = async params => {
      // call the buy options API
      }
      return (
      <CDPReactProvider config={cdpConfig} app={appConfig} theme={themeOverrides}>
      <FundModal
      country="US"
      subdivision="NY"
      cryptoCurrency="ETH"
      fiatCurrency="USD"
      fetchBuyQuote={fetchBuyQuote}
      fetchBuyOptions={fetchBuyOptions}
      network="base"
      presetAmountInputs={[10, 25, 50]}
      >
      <button className="fund-button">
      Get ETH
      </button>
      </FundModal>
      </CDPReactProvider>
      );
      }