Skip to content

Commit

Permalink
docs: Update Identity component preview (#1717)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcramer authored Dec 12, 2024
1 parent d345f19 commit c7d3cff
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 58 deletions.
5 changes: 5 additions & 0 deletions .changeset/spotty-wasps-warn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@coinbase/onchainkit': patch
---

-**docs**: Updated `Identity` component preview. By @cpcramer #1717
10 changes: 5 additions & 5 deletions site/docs/components/landing/ComponentPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getHighlightedCode } from './getHighlightedCode.tsx';
// Demo components and code snippets
import CheckoutDemo, { checkoutDemoCode } from './CheckoutDemo.tsx';
import FundDemo, { fundDemoCode } from './FundDemo.tsx';
import IdentityDemo, { identityDemoCode } from './IdentityDemo.tsx';
import IdentityCardDemo, { identityCardDemoCode } from './IdentityCardDemo.tsx';
import NftMintCardDemo, { nftMintCardDemoCode } from './NftMintCardDemo.tsx';
import SwapDemo, { swapDemoCode } from './SwapDemo.tsx';
import TransactionDemo, { transactionDemoCode } from './TransactionDemo.tsx';
Expand Down Expand Up @@ -60,11 +60,11 @@ const components: Component[] = [
description: 'Fund wallets with a debit card or a coinbase account.',
},
{
name: 'Identity',
component: IdentityDemo,
code: identityDemoCode,
name: 'Identity Card',
component: IdentityCardDemo,
code: identityCardDemoCode,
description:
'Display the Basename, avatar, and address associated with a wallet.',
'Display the Basename, avatar, address, and social media links associated with a wallet.',
},
];

Expand Down
32 changes: 32 additions & 0 deletions site/docs/components/landing/IdentityCardDemo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { IdentityCard } from '@coinbase/onchainkit/identity';
import { base } from 'viem/chains';
import App from '../App.tsx';

export const identityCardDemoCode = `
import { IdentityCard } from '@coinbase/onchainkit/identity';
import { base } from 'viem/chains';
function IdentityCardDemo() {
return (
<IdentityCard
address="0x849151d7D0bF1F34b70d5caD5149D28CC2308bf1"
chain={base}
schemaId="0xf8b05c79f090979bf4a80270aba232dff11a10d9ca55c4f88de95317970f0de9"
/>
)
}
`;

function IdentityCardDemo() {
return (
<App>
<IdentityCard
address="0x849151d7D0bF1F34b70d5caD5149D28CC2308bf1"
chain={base}
schemaId="0xf8b05c79f090979bf4a80270aba232dff11a10d9ca55c4f88de95317970f0de9"
/>
</App>
);
}

export default IdentityCardDemo;
53 changes: 0 additions & 53 deletions site/docs/components/landing/IdentityDemo.tsx

This file was deleted.

0 comments on commit c7d3cff

Please sign in to comment.