diff --git a/apps/playground-web/src/app/connect/ui/wallet/page.tsx b/apps/playground-web/src/app/connect/ui/wallet/page.tsx new file mode 100644 index 00000000000..e97a2dd5599 --- /dev/null +++ b/apps/playground-web/src/app/connect/ui/wallet/page.tsx @@ -0,0 +1,49 @@ +import { APIHeader } from "@/components/blocks/APIHeader"; +import { + WalletIconBasic, + WalletNameBasic, + WalletNameFormat, +} from "@/components/headless-ui/wallet-examples"; + +import ThirdwebProvider from "@/components/thirdweb-provider"; +import { metadataBase } from "@/lib/constants"; +import type { Metadata } from "next"; + +export const metadata: Metadata = { + metadataBase, + title: "Wallet Components", + description: + "Boost your crypto wallet applications with our React headless UI components, optimized for digital asset management. These flexible, unstyled elements simplify cryptocurrency operations while granting developers complete control over the user interface design.", +}; + +export default function Page() { + return ( + +
+ + Boost your crypto wallet applications with our React headless UI + components, optimized for digital asset management. These + flexible, unstyled elements simplify cryptocurrency operations + while granting developers complete control over the user interface + design. + + } + docsLink="https://portal.thirdweb.com/react/v5/connecting-wallets/ui-components" + heroLink="/headless-ui-header.png" + /> +
+ +
+
+ +
+
+ +
+
+
+ ); +} diff --git a/apps/playground-web/src/app/navLinks.ts b/apps/playground-web/src/app/navLinks.ts index 69b11575838..241234ffd50 100644 --- a/apps/playground-web/src/app/navLinks.ts +++ b/apps/playground-web/src/app/navLinks.ts @@ -131,6 +131,10 @@ export const navLinks: SidebarLink[] = [ name: "Chain", href: "/connect/ui/chain", }, + { + name: "Wallet", + href: "/connect/ui/wallet", + }, ], }, ]; diff --git a/apps/playground-web/src/components/headless-ui/wallet-examples.tsx b/apps/playground-web/src/components/headless-ui/wallet-examples.tsx new file mode 100644 index 00000000000..c91788eae2d --- /dev/null +++ b/apps/playground-web/src/components/headless-ui/wallet-examples.tsx @@ -0,0 +1,109 @@ +"use client"; + +import { WalletIcon, WalletName, WalletProvider } from "thirdweb/react"; +import { CodeExample } from "../code/code-example"; + +export function WalletIconBasic() { + return ( + <> +
+

+ WalletIcon +

+

+ Show the icon of a crypto wallet +

+
+ + + Loading...} + /> + + } + code={`import { WalletProvider, WalletIcon } from "thirdweb/react"; + +function App() { + return ( + + Loading...} + /> + + ) +}`} + lang="tsx" + /> + + ); +} + +export function WalletNameBasic() { + return ( + <> +
+

+ WalletName +

+

+ Show the name of a crypto wallet +

+
+ + + Loading...} /> + + } + code={`import { WalletProvider, WalletName } from "thirdweb/react"; + +function App() { + return ( + + Loading...} /> + + ) +}`} + lang="tsx" + /> + + ); +} + +export function WalletNameFormat() { + return ( + <> +
+

+ Transform the wallet name using the formatFn prop. +

+
+ + + `${str} Wallet`} /> + + } + code={`import { WalletProvider, WalletName } from "thirdweb/react"; + +function App() { + return ( + + Loading...} + formatFn={(str: string) => \`\${str} Wallet\`} + /> + + ) +}`} + lang="tsx" + /> + + ); +}