diff --git a/site/docs/components/landing/ComponentPreview.tsx b/site/docs/components/landing/ComponentPreview.tsx index 2d45a31028..a026a8ddb7 100644 --- a/site/docs/components/landing/ComponentPreview.tsx +++ b/site/docs/components/landing/ComponentPreview.tsx @@ -1,6 +1,7 @@ +import type React from 'react'; import { useEffect, useState } from 'react'; -import CopyIcon from '../svg/CopySvg.tsx'; -import CheckIcon from '../svg/checkSvg.tsx'; +import CopyIcon from '../svg/CopySvg.js'; +import CheckIcon from '../svg/checkSvg.js'; // Demo components and code snippets import CheckoutDemo, { checkoutDemoCode } from './CheckoutDemo.tsx'; @@ -83,7 +84,7 @@ function ComponentPreview() { return (
-
+
void; }; +type TabButtonProps = { + isActive: boolean; + onClick: () => void; + children: React.ReactNode; +}; + function PreviewContainer({ activeTab, activeSubTab, @@ -164,77 +171,75 @@ function PreviewContainer({ const ActiveComponent = components[activeTab].component; return ( -
-
-
-
-
- - -
- {activeSubTab === 'code' && ( - +
+
+
+ setActiveSubTab('preview')} + > + Preview + + setActiveSubTab('code')} + > + Code + +
+ {activeSubTab === 'code' && ( +
-
-
-
- -
-
-
-
-                {components[activeTab].code}
-              
-
-
+ + )} +
+
+
+ +
+
+
+            {components[activeTab].code}
+          
); } +function TabButton({ isActive, onClick, children }: TabButtonProps) { + return ( + + ); +} + export default ComponentPreview; diff --git a/site/docs/components/landing/SwapDemo.tsx b/site/docs/components/landing/SwapDemo.tsx index bbda75be7f..9e55ff592b 100644 --- a/site/docs/components/landing/SwapDemo.tsx +++ b/site/docs/components/landing/SwapDemo.tsx @@ -32,7 +32,7 @@ export const swapDemoCode = ` decimals: 18, name: "Ethereum", symbol: "ETH", - image: "https://dynamic-assets.coinbase.com/dbb4b4983bde81309ddab83eb598358eb44375b930b94687ebe38bc22e52c3b2125258ffb8477a5ef22e33d6bd72e32a506c391caa13af64c00e46613c3e5806/asset_icons/4113b082d21cc5fab17fc8f2d19fb996165bcce635e6900f7fc2d57c4ef33ae9.png", + image: "", }; const USDCToken: Token = { @@ -41,7 +41,7 @@ export const swapDemoCode = ` decimals: 6, name: "USDC", symbol: "USDC", - image: "https://dynamic-assets.coinbase.com/3c15df5e2ac7d4abbe9499ed9335041f00c620f28e8de2f93474a9f432058742cdf4674bd43f309e69778a26969372310135be97eb183d91c492154176d455b8/asset_icons/9d67b728b6c8f457717154b3a35f9ddc702eae7e76c4684ee39302c4d7fd0bb8.png", + image: "", }; const swappableTokens: Token[] = [ETHToken, USDCToken]; @@ -54,13 +54,13 @@ export const swapDemoCode = ` function SwapDemo() { return ( -
+
{({ address, swappableTokens }) => { if (address) { return ( - + = ({ children, className }) => ( -
+
{children}
@@ -43,66 +43,68 @@ const Tweets: React.FC = () => { return (
-
-

- Builders ship faster with OnchainKit -

-
-
-
- -

- 🟣 Excited to announce that Basenames are now integrated into the - Fit Club app!
-
- Thanks to{' '} - - @OnchainKit - {' '} - for making it smooth and easy! πŸ’œ -
-
- More updates on the way, stay fit. πŸ‹οΈβ€β™€οΈπŸ‹οΈβ€β™‚οΈ{' '} - pic.twitter.com/5BlIm5kSx3 -

- β€” Fit Club (@fitclubonbase){' '} - - August 23, 2024 - -
- -

- Building with - - @OnchainKit - {' '} - has been such a great experience so far. We're builders, and - we like to build things from scratch. But with{' '} - - @OnchainKit +

+
+

+ Builders ship faster with OnchainKit +

+
+
+
+ +

+ 🟣 Excited to announce that Basenames are now integrated into + the Fit Club app!
+
+ Thanks to{' '} +
+ @OnchainKit + {' '} + for making it smooth and easy! πŸ’œ +
+
+ More updates on the way, stay fit. πŸ‹οΈβ€β™€οΈπŸ‹οΈβ€β™‚οΈ{' '} + pic.twitter.com/5BlIm5kSx3 +

+ β€” Fit Club (@fitclubonbase){' '} + + August 23, 2024 + + + +

+ Building with + + @OnchainKit + {' '} + has been such a great experience so far. We're builders, and + we like to build things from scratch. But with{' '} + + @OnchainKit + + , there was a real boost in productivity, allowing us to ship + dApps with seamless functionality in a matter of minutes.
+
+ Onto the next…{' '} + https://t.co/QzlJ4RIKLG +

+ — Coinfever (@coinfeverapp){' '} + + October 4, 2024 + +
+ +

+ Swap is now live on our website! Feels good to be based, thanks + guys πŸ’™{' '} + pic.twitter.com/vunDYrnT2j +

+ — KEYCAT (@KeyboardCatBase){' '} + + September 24, 2024 - , there was a real boost in productivity, allowing us to ship - dApps with seamless functionality in a matter of minutes.
-
- Onto the next…{' '} - https://t.co/QzlJ4RIKLG -

- — Coinfever (@coinfeverapp){' '} - - October 4, 2024 - -
- -

- Swap is now live on our website! Feels good to be based, thanks - guys πŸ’™{' '} - pic.twitter.com/vunDYrnT2j -

- — KEYCAT (@KeyboardCatBase){' '} - - September 24, 2024 - -
+ +