0.7.3 • Published 2 years ago

@unicrowio/token-dialog-ts v0.7.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Unicrow Token Dialog

image

This dialog is built on TypeScript and uses a list of Arbitrum Tokens that can be found from the official Arbitrum tokenslists exposed by the Arbitrum Bridge (link). You can also use your own tokens list by passing your own tokensList as prop.

It is possible to configure the dialog to pre-select a specific token, pass a list of favorite tokens to display them at the top of the dialog as chips (the user can also add or delete them) or run your own callbacks after a token has been selected - use closeCallback for that.

If the user searches for a token that doesn't exist in the tokens list, the user can add that token to the list (persisting them in the localStorage and always adding it to the provided tokens list). ethers is being used to check whether that added token is a valid address (if not, an error toast gets displayed).

image

Styles are defined with styled-components. The colors for the dialog are calculated pretty dynamic, so if you want to use another primary color, all colors will be updated accordingly. The colors are defined within theme.ts.

Getting Started

Install

npm install

Start

npm start
0.7.2

2 years ago

0.7.3

2 years ago

0.7.0

2 years ago

0.6.0

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago