1.0.0-alpha.30 • Published 5 years ago

@talixo/price v1.0.0-alpha.30

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Talixo Price

UI Component which represents Price

How to install

Package is available as @talixo/price in NPM registry, so you can use it in your project using npm install @talixo/price --save or yarn add @talixo/price.

Requirements

Your package should additionally have some extra dependencies:

  • @talixo/shared: ^1.0.0-alpha.30
  • prop-types: ^15.6.1
  • react: ^16.2.0
  • react-dom: ^16.2.0

These packages are required by @talixo/price, but you have to install them manually, to avoid having different versions of these in your application.

Supported props

Property nameTypeDefaultDescription
classNamestringn/aAdditional class name passed to wrapper.
currencystringn/aCurrency of a price.
currencyToSymbolobjectn/aMapping which provides will be used to convert currency to provided symbol.
displayBeforebooleanfalseShould the currency be displayed before price?
errorPlaceholdernode-This placeholder is displayed if provided value is not a number (isNaN returns true).
localestringn/aLocale code of user.
precisionnumber2Price precision.
prefixnoden/aPrefix which will be displayed before the price. Can be to e.g. indicate that price is approximate.
valuestring / numbern/aGiven price.

Changelog

  • 0.1.0 - initial version