Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadai2010 committed Sep 27, 2024
1 parent 46ad469 commit 8d854b3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/components/Address.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ import { Address } from "@starknet-react/chains";
| **address** | `string` | `undefined` | Address in `0x___` format, it will resolve its ENS if it has one associated. |
| **disableAddressLink** (optional) | `boolean` | `false` | Set it to `true` to disable the blockexplorer link behaviour when clicking on the address. |
| **format** (optional) | `string` | `"short"` | By default, only the first five characters of the address are displayed. Set this to `"long"` to display the entire address. |
| **size** (optional) | `string` | `"base"` | Size for the displayed Address component. `base` by default but you can pass in `xs`, `sm`, `base`, `lg`, `xl`, `2xl`, `3xl`. |
| **size** (optional) | `string` | `"base"` | Size for the displayed Address component. `base` by default but you can pass in `xs`, `sm`, `base`, `lg`, `xl`, `2xl`, `3xl`. |
2 changes: 1 addition & 1 deletion docs/components/AddressInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ const [address, setAddress] = useState("");
| **onChange** | `function` | `undefined` | A callback invoked when the data in the address input changes. |
| **placeholder** (optional) | `string` | `undefined` | The string that will be rendered before address input has been entered. |
| **name** (optional) | `string` | `undefined` | Helps identify the data being sent if AddressInput is submitted into a form. |
| **disabled** (optional) | `boolean` | `false` | If `true`, sets the address input un-clickable and unusable. |
| **disabled** (optional) | `boolean` | `false` | If `true`, sets the address input un-clickable and unusable. |
14 changes: 4 additions & 10 deletions docs/quick-start/customize-your-own-dApp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ description: How to set up your Customize Your Own dApp

# Customize Your Own dApp

We have two main directories that handle different parts of the project: `snfoundry` and `nextjs`.
We have two main directories that handle different parts of the project: `snfoundry` and `nextjs`.

The `snfoundry` directory represents the contracts section, while `nextjs` is for the frontend application.

These two directories together form the complete project structure, with `snfoundry` handling the backend contract logic and `nextjs` providing the frontend interface and interaction. By organizing and editing these two parts effectively, you can build a fully functional and user-friendly decentralized application.


## Customize Contracts (snfoundry)

1. **Edit Smart Contract**:
Expand All @@ -27,7 +26,7 @@ These two directories together form the complete project structure, with `snfoun

### Customize Nextjs App

The `nextjs` directory is a critical part of your dApp, handling the frontend logic and user interface. It offers robust features and flexibility to build a dynamic and responsive application.
The `nextjs` directory is a critical part of your dApp, handling the frontend logic and user interface. It offers robust features and flexibility to build a dynamic and responsive application.
By following these steps, you can effectively customize the pre-built components and use preset hooks to create a unique and fully functional user interface for your decentralized application.
Let's dive into the main characteristics and how you can leverage them for your project.

Expand Down Expand Up @@ -64,17 +63,13 @@ By creating your own wrappers, you can extend and customize the functionality an
Here is an example of how you can create a more complex custom component by wrapping the `Balance` component provided by Scaffold Stark:

```js
import { Balance } from 'path/to/scaffold-stark/components';
import { Balance } from "path/to/scaffold-stark/components";

const MyBalance = ({ address }) => {
return (
<div className="p-6 bg-white rounded-lg shadow-lg">
<div className="flex items-center mb-4">
<img
src="/path/to/icon.png"
alt="Account Icon"
className="w-12 h-12 rounded-full mr-4"
/>
<img src="/path/to/icon.png" alt="Account Icon" className="w-12 h-12 rounded-full mr-4" />
<div>
<h2 className="text-2xl font-semibold">Account Balance</h2>
<p className="text-gray-600">{address}</p>
Expand Down Expand Up @@ -111,7 +106,6 @@ In this example, the `MyBalance` component:
4. **Integrate with Your Application**:
Use your custom component in your application wherever needed. This allows you to maintain consistency while customizing components for specific business requirements.


### Using Scaffold Stark Hooks

The `hooks` directory, located at `packages/nextjs/hooks/scaffold-stark`, offers several hooks.
Expand Down
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const config = {
{
label: "Telegram",
href: "https://t.me/+wO3PtlRAreo4MDI9",
}
},
],
},
],
Expand Down

0 comments on commit 8d854b3

Please sign in to comment.