npm.io
1.0.4 • Published 5 years ago

antd-money

Licence
MIT
Version
1.0.4
Deps
0
Size
52 kB
Vulns
0
Weekly
0

antd-money

React money/currency input using ant design.

Usage

<MoneyInput 
    prefix={"$"} 
    commaSeperator={true} 
    onChange={inputChanged} 
    defaultValue={12.50}
/>

Attributes

  • prefix: Currency sign as string. e.g. $, £, TRY etc.
  • commaSeperator: A boolean flag. If true, comma is used as decimal seperator and point is used as thousand seperator. If false or undefined, point is used as decimal seperator and comma is used as thousand seperator.
  • onChange: When value is changed, onChange is called with numeric value of the input e.g. $1,234.56 returns within the event handler as 1234.56
  • defaultValue Default value of the input. e.g. 12.50 or 20.3 etc.

https://github.com/yeulucay/antd-money

Keywords