1.0.6 • Published 8 years ago

react-native-moneyformattext v1.0.6

Weekly downloads
3
License
ISC
Repository
github
Last release
8 years ago

React-Native-MoneyFormatText

这是一个对金额进行格式化的React-native组件,兼容ios和android

moneyformattext preview

Installation

npm install -save react-native-moneyformattext

Usage example

import {MoneyFormatText} from "react-native-moneyformattext";

<MoneyFormatText text="1200000" bigTextFontSize={20} smallTextFontSize={12} hasRMB={true} RMB="$"/>
<MoneyFormatText text="¥1200000" bigTextFontSize={20} smallTextFontSize={12} hasRMB={true}/>
<MoneyFormatText text="¥1200000" bigTextFontSize={20} smallTextFontSize={12} hasRMB={false} RMB="$"/>
<MoneyFormatText text="$1200000" bigTextFontSize={20} smallTextFontSize={12} hasRMB={true} RMB="¥" textColor="red"/>
<MoneyFormatText text="¥1200000" bigTextFontSize={20} smallTextFontSize={12} hasRMB={true} RMB="¥" textColor="black"/>
<MoneyFormatText text="$1200000" bigTextFontSize={20} smallTextFontSize={12} hasRMB={true} RMB="¥"/>

Props

PropTypeOptionalDefaultDescription
textstringYes""content of this component
textColorcolorYes'#E51111'color of text
stylestyleYesstyle for this component
bigTextFontSizenumberYes25big fontSize for one of these parts in text
smallTextFontSizenumberYes12small fontSize for one of these parts in text
textStylestyleYesstyle for text when status!="money" (just normal text)
statusstringYes"money"if status="money" show formatted money,else show normal text
hasSymbol          bool  Yes      true  if true,will show RMB
symbolstringYes"¥"the symbol of money

To Do

https://github.com/wslcsok/React-Native-MoneyFormatText/issues

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago