Skip to content

Commit

Permalink
separate component examples from states (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
technophile-04 authored Dec 18, 2024
1 parent 469d0a8 commit db92d14
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion docs/components/AddressInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ import { AddressInput } from "~~/components/scaffold-eth";

```tsx
const [address, setAddress] = useState("");
```

<AddressInput onChange={setAddress} value={address} placeholder="Input your address" />;
```tsx
<AddressInput onChange={setAddress} value={address} placeholder="Input your address" />
```

## Props
Expand Down
4 changes: 3 additions & 1 deletion docs/components/EtherInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ import { EtherInput } from "~~/components/scaffold-eth";

```tsx
const [ethAmount, setEthAmount] = useState("");
```

<EtherInput value={ethAmount} onChange={amount => setEthAmount(amount)} />;
```tsx
<EtherInput value={ethAmount} onChange={amount => setEthAmount(amount)} />
```

## Props
Expand Down
4 changes: 3 additions & 1 deletion docs/components/InputBase.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ import { InputBase } from "~~/components/scaffold-eth";

```tsx
const [url, setUrl] = useState<string>();
```

<InputBase name="url" placeholder="url" value={url} onChange={setUrl} />;
```tsx
<InputBase name="url" placeholder="url" value={url} onChange={setUrl} />
```

## Props
Expand Down
4 changes: 3 additions & 1 deletion docs/components/IntergerInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ import { IntegerInput } from "~~/components/scaffold-eth";

```tsx
const [txValue, setTxValue] = useState<string | bigint>("");
```

```tsx
<IntegerInput
value={txValue}
onChange={updatedTxValue => {
setTxValue(updatedTxValue);
}}
placeholder="value (wei)"
/>;
/>
```

## Props
Expand Down

0 comments on commit db92d14

Please sign in to comment.