Skip to content

Commit

Permalink
Save progress
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcramer committed Jun 28, 2024
1 parent cabb5d3 commit a3c7dbf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
8 changes: 4 additions & 4 deletions site/docs/components/App.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
'use client';
import type { ReactNode } from 'react';
import { OnchainKitProvider } from '@coinbase/onchainkit';
// import { OnchainKitProvider } from '../../../src';
// import { OnchainKitProvider } from '@coinbase/onchainkit';
import { OnchainKitProvider } from '../../../src';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { WagmiProvider, createConfig, http } from 'wagmi';
import { base } from 'wagmi/chains';
import { coinbaseWallet } from 'wagmi/connectors';

import '@coinbase/onchainkit/styles.css';
// import '../../../src/styles.css';
// import '@coinbase/onchainkit/styles.css';
import '../../../src/styles.css';

const queryClient = new QueryClient();

Expand Down
5 changes: 3 additions & 2 deletions site/docs/pages/identity/address.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Address } from '@coinbase/onchainkit/identity';
{/* import { Address } from '@coinbase/onchainkit/identity'; */}
import { Address } from '../../../../src/identity';
import { color } from '@coinbase/onchainkit/theme';
import App from '../../components/App';

Expand Down Expand Up @@ -30,7 +31,7 @@ import { Address } from '@coinbase/onchainkit/identity';
```

<App>
<Address className="bg-white px-2 py-1" address="0x02feeb0AdE57b6adEEdE5A4EEea6Cf8c21BeB6B1" />
<Address className="bg-white px-2 py-1" address="0x02feeb0AdE57b6adEEdE5A4EEea6Cf8c21BeB6B1"/>
</App>

## Props
Expand Down
7 changes: 4 additions & 3 deletions site/docs/pages/identity/name.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Badge, Name, Identity, } from '@coinbase/onchainkit/identity';
{/* import { Badge, Name, Identity, } from '@coinbase/onchainkit/identity'; */}
import { Badge, Name, Identity, } from '../../../../src/identity';
import App from '../../components/App';

# `<Name />`
Expand Down Expand Up @@ -29,7 +30,7 @@ import { Name } from '@coinbase/onchainkit/identity';
```

<App>
<Name className="bg-default px-2 py-1" address="0x02feeb0AdE57b6adEEdE5A4EEea6Cf8c21BeB6B1" />
<Name className="bg-default px-2 py-1" isSliced={false} address="0x894431432437196" />
</App>

Address without an ENS name, and it defaults to his sliced address:
Expand All @@ -40,7 +41,7 @@ import { Name } from '@coinbase/onchainkit/identity';
```

<App>
<Name address="0x1234567890abcdef1234567890abcdef12345678" />
<Name sliced={false} isSliced={false} address="0x435233231234567890abcdef1234567890abcdef12345678" />
</App>

Show attestation on ENV name with [`Badge`](/identity/badge) component.
Expand Down
4 changes: 2 additions & 2 deletions src/identity/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ export type IdentityReact = {
*/
export type NameReact = {
address?: Address | null; // Ethereum address to be displayed.
isSliced?: boolean; // Determines if the displayed address should be shortened.
isSliced?: boolean; // Determines if the displayed address should be sliced when no ENS name is available.
className?: string; // Optional className override for top span element.
sliced?: boolean; // Determines if the address should be sliced when no ENS name is available.
// sliced?: boolean; // Determines if the displayed address should be sliced when no ENS name is available.
children?: ReactNode; // Optional attestation by passing Badge component as its children
} & HTMLAttributes<HTMLSpanElement>; // Optional additional span attributes to apply to the name.

Expand Down

0 comments on commit a3c7dbf

Please sign in to comment.