@burrow-ui/amount
v0.1.7
Published
Currency amount display for Burrow UI (formatPrice + colored text + optional icon slot)
Maintainers
Readme
@burrow-ui/amount
Currency amount display: formats a number to two decimals, picks a color
based on currencyType, and optionally renders a consumer-provided icon
on the left or right.
import {Amount} from "@burrow-ui/amount";
import coin from "./coin.svg";
<Amount amount={1000} currencyType="coin" icon={<img src={coin} alt="" />} />
<Amount amount={123.456} currencyType="coinRed" iconPosition="right" />Note on icons
burrow-ui does not bundle currency icons (those are project-specific
assets). Pass any ReactNode via icon — the component sizes the slot to
match the size prop.
formatPrice is exported separately if you need to format prices outside
of the component.
