BootNodeDev / dAppBooster

A modern blockchain boilerplate built to quickly get you started with your next project.
https://dappbooster.dev
MIT License
5 stars 1 forks source link

feat(tokenInput): number format #199

Closed fernandomg closed 4 months ago

fernandomg commented 4 months ago

Closes #95

Description:

This adds a 3rd party library (react-number-format) that handles the input formatting.

It wraps the TextField passed to the BigNumberInput component, in the TokenInput implementation.

TokenInput has a new prop (thousandSeparator, default to true) that enables activating/deactivating this feature.

We can explore the functionality that this library provides. For instance, the number formatting in general, we can get rid of the uniswap/conedison code altogether.

Steps:

Use the token input example, enter values >= 1000, and see the magic 🪄

Type of change:

How Has This Been Tested?

Remember to check that:

Screenshots

image
vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
dappbooster ✅ Ready (Inspect) Visit Preview Aug 1, 2024 2:13pm
fernandomg commented 4 months ago

I think it works fine. Code looks good to me.

For instance, the number formatting in general, we can get rid of the uniswap/conedison code altogether.

How difficult a task would this be? Can it be done here? Else create an issue so somebody works on this later.

new issue: https://github.com/BootNodeDev/dAppBooster/issues/200