Skip to content

Commit

Permalink
feat: cleanup primitives
Browse files Browse the repository at this point in the history
  • Loading branch information
marthendalnunes committed Nov 28, 2023
1 parent 19342e8 commit 3a5708b
Show file tree
Hide file tree
Showing 110 changed files with 12,573 additions and 12,542 deletions.
2 changes: 1 addition & 1 deletion apps/www/__registry__/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Files are auto-generated. Do not edit!
Files are auto-generated. Do not edit!
32 changes: 23 additions & 9 deletions apps/www/__registry__/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ export const Index: Record<string, any> = {
component: React.lazy(() => import("@/registry/default/buidl/block-explorer-link")),
files: ["registry/default/buidl/block-explorer-link.tsx"],
},
"transaction-status": {
name: "transaction-status",
type: "components:buidl",
registryDependencies: undefined,
component: React.lazy(() => import("@/registry/default/buidl/transaction-status")),
files: ["registry/default/buidl/transaction-status.tsx"],
},
"blockie": {
name: "blockie",
type: "components:buidl",
Expand Down Expand Up @@ -183,14 +190,14 @@ export const Index: Record<string, any> = {
"account-balance-demo": {
name: "account-balance-demo",
type: "components:example",
registryDependencies: ["account-address"],
registryDependencies: ["account-balance"],
component: React.lazy(() => import("@/registry/default/example/account-balance-demo")),
files: ["registry/default/example/account-balance-demo.tsx"],
},
"account-blockie-demo": {
name: "account-blockie-demo",
type: "components:example",
registryDependencies: ["account-address"],
registryDependencies: ["account-blockie"],
component: React.lazy(() => import("@/registry/default/example/account-blockie-demo")),
files: ["registry/default/example/account-blockie-demo.tsx"],
},
Expand All @@ -211,7 +218,7 @@ export const Index: Record<string, any> = {
"account-nonce-demo": {
name: "account-nonce-demo",
type: "components:example",
registryDependencies: ["account-ens-name"],
registryDependencies: ["account-nonce"],
component: React.lazy(() => import("@/registry/default/example/account-nonce-demo")),
files: ["registry/default/example/account-nonce-demo.tsx"],
},
Expand All @@ -225,10 +232,17 @@ export const Index: Record<string, any> = {
"block-explorer-link-demo": {
name: "block-explorer-link-demo",
type: "components:example",
registryDependencies: ["address"],
registryDependencies: ["block-explorer-link"],
component: React.lazy(() => import("@/registry/default/example/block-explorer-link-demo")),
files: ["registry/default/example/block-explorer-link-demo.tsx"],
},
"transaction-status-demo": {
name: "transaction-status-demo",
type: "components:example",
registryDependencies: ["transaction-status"],
component: React.lazy(() => import("@/registry/default/example/transaction-status-demo")),
files: ["registry/default/example/transaction-status-demo.tsx"],
},
"blockie-demo": {
name: "blockie-demo",
type: "components:example",
Expand All @@ -253,21 +267,21 @@ export const Index: Record<string, any> = {
"image-ipfs-demo": {
name: "image-ipfs-demo",
type: "components:example",
registryDependencies: ["ens-name"],
registryDependencies: ["image-ipfs"],
component: React.lazy(() => import("@/registry/default/example/image-ipfs-demo")),
files: ["registry/default/example/image-ipfs-demo.tsx"],
},
"is-wallet-connected-demo": {
name: "is-wallet-connected-demo",
type: "components:example",
registryDependencies: undefined,
registryDependencies: ["is-wallet-connected"],
component: React.lazy(() => import("@/registry/default/example/is-wallet-connected-demo")),
files: ["registry/default/example/is-wallet-connected-demo.tsx"],
},
"is-wallet-disconnected-demo": {
name: "is-wallet-disconnected-demo",
type: "components:example",
registryDependencies: undefined,
registryDependencies: ["is-wallet-disconnected"],
component: React.lazy(() => import("@/registry/default/example/is-wallet-disconnected-demo")),
files: ["registry/default/example/is-wallet-disconnected-demo.tsx"],
},
Expand All @@ -288,7 +302,7 @@ export const Index: Record<string, any> = {
"wallet-disconnect-demo": {
name: "wallet-disconnect-demo",
type: "components:example",
registryDependencies: ["wallet-connect"],
registryDependencies: ["wallet-disconnect"],
component: React.lazy(() => import("@/registry/default/example/wallet-disconnect-demo")),
files: ["registry/default/example/wallet-disconnect-demo.tsx"],
},
Expand Down Expand Up @@ -323,7 +337,7 @@ export const Index: Record<string, any> = {
"erc20-select-and-amount-demo": {
name: "erc20-select-and-amount-demo",
type: "components:example",
registryDependencies: undefined,
registryDependencies: ["erc20-select-and-amount"],
component: React.lazy(() => import("@/registry/default/example/erc20-select-and-amount-demo")),
files: ["registry/default/example/erc20-select-and-amount-demo.tsx"],
},
Expand Down
5 changes: 5 additions & 0 deletions apps/www/config/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ export const docsConfig: DocsConfig = {
href: "/docs/components/block-explorer-link",
items: [],
},
{
title: "Transaction Status",
href: "/docs/components/transaction-status",
items: [],
},
{
title: "Blockie",
href: "/docs/components/blockie",
Expand Down
18 changes: 16 additions & 2 deletions apps/www/content/docs/components/address.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,23 @@ wagmi:
## Usage

```tsx
import { Address } from "@/components/buidl/address"
import {
Address,
AddressCopy,
AddressLink,
} from "@/registry/default/buidl/address"
```

```tsx
<Address />
<Address address={"0x761d584f1C2d43cBc3F42ECd739701a36dFFAa31"} />

<Address link address={"0x761d584f1C2d43cBc3F42ECd739701a36dFFAa31"} />
<AddressLink address={"0x761d584f1C2d43cBc3F42ECd739701a36dFFAa31"} />

<Address copy address={"0x761d584f1C2d43cBc3F42ECd739701a36dFFAa31"} />
<AddressCopy address={"0x761d584f1C2d43cBc3F42ECd739701a36dFFAa31"} />

<Address truncate address={"0x761d584f1C2d43cBc3F42ECd739701a36dFFAa31"} />

<Address link copy truncate address={"0x761d584f1C2d43cBc3F42ECd739701a36dFFAa31"} />
```
8 changes: 5 additions & 3 deletions apps/www/content/docs/components/block-explorer-link.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@ wagmi:
## Usage

```tsx
import { WalletConnect } from "@/components/buidl/wallet-connect"
import { BlockExplorerLink } from "@/registry/default/buidl/block-explorer-link"
```

```tsx
<WalletConnect />
<WalletConnect>Custom Text</WalletConnect>
<BlockExplorerLink data={"0x761d584f1C2d43cBc3F42ECd739701a36dFFAa31"} />
<BlockExplorerLink data={"0x761d584f1C2d43cBc3F42ECd739701a36dFFAa31"} showBlockExplorerName />
<BlockExplorerLink data={"0x761d584f1C2d43cBc3F42ECd739701a36dFFAa31"}>Go to Block Explorer</BlockExplorerLink>
<BlockExplorerLink type="tx" data="0x827069d50d3a5ec0d19327f4b1bb1ecfbe939ef26bc3b6cc2dae5a1574f1e6f8"/>
```
57 changes: 57 additions & 0 deletions apps/www/content/docs/components/transaction-status.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: Transaction Status
description: Displays the status of a transaction
component: true
wagmi:
link: https://wagmi.sh/react/hooks/useWaitForTransaction
---

<ComponentPreview
name="transaction-status-demo"
className="[&_.preview>[data-orientation=vertical]]:sm:max-w-[70%]"
/>

## Installation

<Tabs defaultValue="manual">

<TabsList>
<TabsTrigger value="manual">Manual</TabsTrigger>
<TabsTrigger disabled={true} value="cli">
CLI (Coming Soon)
</TabsTrigger>
</TabsList>

<TabsContent value="cli">

<Steps>

<Step>Coming soon...</Step>

</Steps>

</TabsContent>

<TabsContent value="manual">

<Steps>

<Step>Copy and paste the following code into your project.</Step>

<ComponentSource name="transaction-status" />

</Steps>

</TabsContent>

</Tabs>

## Usage

```tsx
import { TransactionStatus } from "@/registry/default/buidl/transaction-status"
```

```tsx
<TransactionStatus hash="0x3e2ba590d81b64282ce7a3b20b1913b4c6dde05345a058b18bfef5717bc09c5e" />
```
Loading

0 comments on commit 3a5708b

Please sign in to comment.