Sha256: 972066c1ace45a52c730ad06f1b5113316962320e423d85cf55bb5d50a196d65
Contents?: true
Size: 1 KB
Versions: 12
Compression:
Stored size: 1 KB
Contents
Rev.registerComponent('NumberFormatter', class NumberFormatter extends React.Component { static get propTypes() { return { value: React.PropTypes.number.isRequired, locales: React.PropTypes.string, localeMatcher: React.PropTypes.oneOf(['lookup', 'best fit']), style: React.PropTypes.oneOf(['decimal', 'currency', 'percent']), currency: React.PropTypes.string, currencyDisplay: React.PropTypes.oneOf(['symbol', 'code', 'name']), useGrouping: React.PropTypes.bool, minimumIntegerDigits: React.PropTypes.number, minimumFractionDigits: React.PropTypes.number, maximumFractionDigits: React.PropTypes.number, minimumSignificantDigits: React.PropTypes.number, maximumSignificantDigits: React.PropTypes.number, } } get optionProps() { return _.omit(this.props, ['locales', 'value']) } get text() { return this.props.value.toLocaleString(this.props.locales, this.optionProps) } render() { return <span>{this.text}</span> } })
Version data entries
12 entries across 12 versions & 1 rubygems