0.5.10 • Published 1 year ago

estimate-gas-widget v0.5.10

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Description

The Estimate Gas Widget is a React-based component designed to help you calculate Ethereum gas fees effortlessly. It fetches real-time gas prices and displays them, allowing users to make informed decisions about their transactions. The widget is customizable with themes and configurations, making it adaptable to various applications.

Installation and Usage

First things first, let's get this baby up and running. Clone the repo and install those juicy dependencies:

npm i estimate-gas-widget
// or
yarn add estimate-gas-widget

To use the widget in your Next.js project, add the following to your component:

import EstimateGasWidget from 'estimate-gas-widget';

const App = () => {
  return (
    <EstimateGasWidget />
  );
};

Configuration

The widget is highly configurable. Here's how you can tweak the settings:

1.Theme

Widget supports light and dark modes, it gets themeMode key from local storage. Or alternatively its possible to pass mui theme to override to custom theme (keep in mind in that case you have to handle theme modes switch).

<EstimateGasWidget theme={customMuiTheme} />

2. Wagmi config

Widget has default config, it can be changed by passing wagmi config (chains configured here)

import EstimateGasWidget from 'estimate-gas-widget';
import { getDefaultConfig } from '@rainbow-me/rainbowkit'
import { arbitrum, mainnet, optimism } from 'wagmi/chains'

const config = getDefaultConfig({
  appName: 'Your Amazing App',
  projectId: 'YOUR_PROJECT_ID',
  chains:[
    mainnet,
    optimism,
    arbitrum,
  ],
  ssr: true,
});

const App = () => {
  return (
    <EstimateGasWidget config={config} />
  );
};

3. Query client

Query client can be overwritten as well

import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
const client = new QueryClient();

const App = () => {
  return (
    <EstimateGasWidget client={client} />
  );
};

Docs

0.5.10

1 year ago

0.5.9

1 year ago

0.5.8

1 year ago

0.5.7

1 year ago

0.5.6

1 year ago

0.5.5

1 year ago

0.5.4

1 year ago

0.5.3

1 year ago

0.5.2

1 year ago

0.5.1

1 year ago

0.5.0

1 year ago

0.4.17

1 year ago

0.4.15

1 year ago

0.4.14

1 year ago

0.4.13

1 year ago

0.4.12

1 year ago

0.4.11

1 year ago

0.4.10

1 year ago

0.4.9

1 year ago

0.4.8

1 year ago

0.4.7

1 year ago

0.4.6

1 year ago

0.4.5

1 year ago

0.4.4

1 year ago

0.4.3

1 year ago

0.4.2

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.3.19

1 year ago

0.3.18

1 year ago

0.3.17

1 year ago

0.3.16

1 year ago

0.3.15

1 year ago

0.3.14

1 year ago

0.3.13

1 year ago

0.3.12

1 year ago

0.3.11

1 year ago

0.3.10

1 year ago

0.3.9

1 year ago

0.3.7

1 year ago

0.3.6

1 year ago

0.3.5

1 year ago

0.3.4

1 year ago

0.3.3

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.41

1 year ago

0.2.40

1 year ago

0.2.38

1 year ago

0.2.37

1 year ago

0.2.36

1 year ago

0.2.35

1 year ago

0.2.34

1 year ago

0.2.33

1 year ago

0.2.32

1 year ago

0.2.31

1 year ago

0.2.30

1 year ago

0.2.29

1 year ago

0.2.28

1 year ago

0.2.27

1 year ago

0.2.26

1 year ago

0.2.25

1 year ago

0.2.24

1 year ago

0.2.23

1 year ago

0.2.22

1 year ago

0.2.21

1 year ago

0.2.20

1 year ago

0.2.19

1 year ago

0.2.18

1 year ago

0.2.17

1 year ago

0.2.16

1 year ago

0.2.15

1 year ago

0.2.14

1 year ago

0.2.13

1 year ago

0.2.12

1 year ago

0.2.11

1 year ago

0.2.10

1 year ago

0.2.9

1 year ago

0.2.8

1 year ago

0.2.7

1 year ago

0.2.6

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.0

1 year ago