edge / wallet

The web wallet of the XE Blockchain.

Home Page:https://wallet.xe.network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve coverage of Amount component

annybs opened this issue · comments

commented

There is a mix of <Amount/> components and manual {{ formatCurrency(amount) }} calls in modals. Ideally all monetary values should be represented through the component, but it has scoped styles that affect appearance when misused.

Some possible approaches:

  • Add a flag to the component to disable styling (I experimented with a sub boolean to toggle sub/span with unsatisfactory results)
  • Remove styling from the component and reapply in parent component where appropriate
  • Just don't, and say we did
commented

Additionally, the component should handle different types of value as follows:

  • undefined -> placeholder value (currently "...")
  • NaN -> emdash placeholder (—)
  • String -> as-is (assumed preformatted)
  • Number -> per current implementation