-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: AssetIcon component & eslint errors * feat: added chains icons * fix: update workflows * fix: cleanup
- Loading branch information
Showing
960 changed files
with
3,433 additions
and
3,595 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# React web3 icons preview | ||
This is a small application that has a gallery of all the asset icons that are included in the package. Also here you can immediately download the SVG icon of the asset you need in the desired version if you do not need to install the package, or for some reason the package does not suit you. | ||
This is a small application that has a gallery of all the icons that are included in the package. Also here you can immediately download the SVG icon of the asset you need in the desired version if you do not need to install the package, or for some reason the package does not suit you. | ||
|
||
## Copyright | ||
2024 BGD Labs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
"use client"; | ||
|
||
import { ChainIcon } from "@bgd-labs/react-web3-icons"; | ||
import { renderToString } from "react-dom/server"; | ||
|
||
import { CopyToClipboard } from "@/components/CopyToClipboard"; | ||
import { DownloadButton } from "@/components/DownloadButton"; | ||
|
||
export const ChainIconCard = ({ | ||
name, | ||
chainId, | ||
}: { | ||
name: string; | ||
chainId: number; | ||
}) => { | ||
const Icon = () => <ChainIcon chainId={chainId} />; | ||
|
||
return ( | ||
<div className="relative flex h-[175px] w-[175px] flex-col justify-center border border-gray-200"> | ||
<div className="absolute top-0 w-full flex-1"> | ||
<div className="max-w-[75%] p-2"> | ||
<div className="text-sm font-semibold text-gray-800">{name}</div> | ||
<div className="font-mono text-xs uppercase text-gray-400"> | ||
{chainId} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div className="flex-1" /> | ||
|
||
<div className="flex size-11 w-full flex-1 items-center justify-center"> | ||
<Icon /> | ||
</div> | ||
|
||
<div className="relative flex flex-1 items-end justify-between"> | ||
<div className="flex flex-1 items-end justify-end"> | ||
<DownloadButton svgComponent={<Icon />} fileName={name} /> | ||
<CopyToClipboard copyText={renderToString(<Icon />)} /> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Icons | ||
|
||
**Do not edit these files directly.** They are automatically generated by the `generate.ts` script located in the `scripts` directory and are intended for use in the published packages. | ||
**Do not edit these files directly.** They are automatically generated by the `generate.ts` and `generateChains.ts` script located in the `scripts` directory and are intended for use in the published packages. |
Oops, something went wrong.