Azeirah / react-currency-formatter

πŸ’΅ react component for currency formatting

Home Page:https://xdae.github.io/react-currency-formatter/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ’΅ react currency formatter

npm npm David Travis license

πŸ’» DEMO!

Usage

Simple

import Currency from 'react-currency-formatter';

<Currency
  quantity={45685}
  currency="EUR"
/>

Complex

import Currency from 'react-currency-formatter';

<Currency
  quantity={45685}          // Required
  currency="USD"            // Optional (USD by default)
  locale="en_EN"            // Optional
  pattern="##,### !"        // Optional
  decimal=","               // Optional
  group="."                 // Optional
/>

TypeScript

import * as React from 'react'
import * as CurrencyFormatter from 'react-currency-formatter'

type Props = {
	price: number,
	currency: string,
}

const ProductionPrice: React.SFC<Props> = (props: Props) => (
	<CurrencyFormatter quantity={props.price} currency={props.currency} />
)

export default ProductionPrice

Support

Please open an issue for support.

Contributing

Please contribute using Github Flow. Create a branch, add commits, and open a pull request.

About

πŸ’΅ react component for currency formatting

https://xdae.github.io/react-currency-formatter/

License:MIT License


Languages

Language:JavaScript 100.0%