nyuchimzizi
Mzizi — an open-architecture project of the Bundu Foundation, operated and developed by Nyuchi. Built on the Five African Minerals palette.
Built by Nyuchi Africav4.0.39
Transaction cost preview showing estimated gas fee in NHC with fiat equivalent. Highlights that MIT holders have static gas prices per Honeycomb protocol. Used before any on-chain transaction in Wallet.
View the full component source code below.
import * as React from "react"
import { cn } from "@/lib/utils"
interface GasEstimatorProps extends React.ComponentProps<"div"> {
estimatedNhc: number
fiatEquivalent?: string
fiatCurrency?: string
isMitHolder?: boolean
staticPrice?: number
}
function GasEstimator({
estimatedNhc, fiatEquivalent, fiatCurrency = "USD", isMitHolder = false, staticPrice, loading = false, className, ...props
}: GasEstimatorProps) {
return (
<div
data-slot="gas-estimator" data-portal="https://design.nyuchi.com/components/gas-estimator" role="article"
className={cn("flex items-center justify-between rounded-[var(--radius-md,12px)] border border-border bg-muted/30 px-3 py-2 text-sm", className)}
{...props}
>
<div className="flex items-center gap-2">
<span className="text-xs text-muted-foreground">Est. fee</span>
<span className="font-medium tabular-nums">{estimatedNhc.toFixed(4)} NHC</span>
{fiatEquivalent && (
<span className="text-xs text-muted-foreground">(~{fiatEquivalent} {fiatCurrency})</span>
)}
</div>
{isMitHolder && (
<span className="rounded-full bg-[var(--color-gold,#FFD740)]/10 px-2 py-0.5 text-[9px] font-medium text-[var(--color-gold,#FFD740)]">
Static price
</span>
)}
</div>
)
}
export { GasEstimator }
export type { GasEstimatorProps }
npx shadcn@latest add https://mzizi.dev/api/v1/ui/gas-estimatorFetch this component's metadata and source code from the registry API.
/api/v1/ui/gas-estimator