Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update Identity component preview #1717

Merged
merged 4 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
33 changes: 33 additions & 0 deletions site/docs/components/landing/IdentityCardDemo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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"
className="rounded-lg bg-gray-100 px-4 py-2 dark:bg-gray-900"
/>
</App>
);
}

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

This file was deleted.

Loading