diff --git a/.changeset/honest-hands-clap.md b/.changeset/honest-hands-clap.md new file mode 100644 index 00000000000..0dfc2e7bcee --- /dev/null +++ b/.changeset/honest-hands-clap.md @@ -0,0 +1,5 @@ +--- +"thirdweb": patch +--- + +Add `persistTokenSelections` prop on `SwapWidget` to allow disabling token selection persistence to local storage diff --git a/apps/playground-web/src/app/bridge/swap-widget/components/code.tsx b/apps/playground-web/src/app/bridge/swap-widget/components/code.tsx new file mode 100644 index 00000000000..b0a2358dbbe --- /dev/null +++ b/apps/playground-web/src/app/bridge/swap-widget/components/code.tsx @@ -0,0 +1,105 @@ +import { lazy, Suspense } from "react"; +import { LoadingDots } from "@/components/ui/LoadingDots"; +import type { SwapWidgetPlaygroundOptions } from "./types"; + +const CodeClient = lazy(() => + import("../../../../components/code/code.client").then((m) => ({ + default: m.CodeClient, + })), +); + +function CodeLoading() { + return ( +
+ Sets the default token and amount to{" "}
+ {props.type === "buyToken" ? "buy" : "sell"} in the widget,
+ User can change this default selection in the widget
+