near-react-gas-display
v1.1.8939
Published
npm Package - @near-react/gas-display
Readme
near-react-gas-display
A React component for displaying NEAR Protocol gas prices in real time.
Installation
npm install near-react-gas-display
Usage
import { NearReactGasDisplay } from 'near-react-gas-display'
function App() { return }
Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| className | string | — | Custom CSS class name |
| style | React.CSSProperties | — | Inline style overrides |
| refreshInterval | number | — | Polling interval in milliseconds |
| showGwei | boolean | — | Show gas price in Gwei |
| label | string | — | Custom label text |
| precision | number | — | Decimal precision for displayed values |
Examples
Basic usage with default styling:
With custom label and refresh interval:
Show Gwei value with custom styling:
<NearReactGasDisplay showGwei={true} precision={4} style={{ background: '#fff', border: '1px solid #eee' }} className="my-gas-display" />
Auto-refresh every 10 seconds:
License
MIT
