react-currency-formatter-v2
Version:
react currency formatter Component
63 lines (45 loc) • 1.9 kB
Markdown
[](https://www.npmjs.com/package/react-currency-formatter)
[](https://www.npmjs.com/package/react-currency-formatter)
[](https://david-dm.org/xDae/react-currency-formatter)
[](https://travis-ci.org/xDae/react-currency-formatter)
[]()
```js
import Currency from 'react-currency-formatter';
<Currency
quantity={45685}
currency="EUR"
/>
```
```js
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
/>
```
```ts
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
```
Please [open an issue](https://github.com/xDae/react-currency-formatter/issues/new) for support.
Please contribute using [Github Flow](https://guides.github.com/introduction/flow/). Create a branch, add commits, and [open a pull request](https://github.com/xDae/react-currency-formatter/compare/).