How to use the react-intl.FormattedNumber function in react-intl

To help you get started, we’ve selected a few react-intl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github LLK / scratch-www / src / views / messages / presentation.jsx View on Github external
const bindAll = require('lodash.bindall');
const FormattedMessage = require('react-intl').FormattedMessage;
const FormattedNumber = require('react-intl').FormattedNumber;
const injectIntl = require('react-intl').injectIntl;
const intlShape = require('react-intl').intlShape;
const PropTypes = require('prop-types');
const React = require('react');

const Button = require('../../components/forms/button.jsx');
const FlexRow = require('../../components/flex-row/flex-row.jsx');
const Form = require('../../components/forms/form.jsx');
const Select = require('../../components/forms/select.jsx');
const TitleBanner = require('../../components/title-banner/title-banner.jsx');

const messageStatuses = require('../../redux/messages').Status;

// Message Components
const AdminMessage = require('./message-rows/admin-message.jsx');
const BecomeManagerMessage = require('./message-rows/become-manager.jsx');
github este / este / src / native / app / components / formatted.js View on Github external
}
        
      );
    }

  };

export const FormattedDate = native(reactIntl.FormattedDate);
export const FormattedMessage = native(reactIntl.FormattedMessage);
export const FormattedNumber = native(reactIntl.FormattedNumber);
export const FormattedPlural = native(reactIntl.FormattedPlural);
export const FormattedRelative = native(reactIntl.FormattedRelative);
export const FormattedTime = native(reactIntl.FormattedTime);
github geosolutions-it / MapStore2 / web / client / examples / mouseposition / components / FindGeoSolutions.jsx View on Github external
var PropTypes = require('prop-types');
/**
 * Copyright 2015, GeoSolutions Sas.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree.
 */
var React = require('react');
var BootstrapReact = require('react-bootstrap');
var Label = BootstrapReact.Label;
var ProgressBar = BootstrapReact.ProgressBar;
var ReactIntl = require('react-intl');
var FormattedNumber = ReactIntl.FormattedNumber;

class SearchTarget extends React.Component {
    static propTypes = {
        position: PropTypes.shape({
            lng: PropTypes.number,
            lat: PropTypes.number
        }),
        geosolutions: PropTypes.shape({
            lng: PropTypes.number,
            lat: PropTypes.number
        })
    };

    static defaultProps = {
        position: null,
        geosolutions: {
github LLK / scratch-www / src / components / cappednumber / cappednumber.jsx View on Github external
const PropTypes = require('prop-types');
const React = require('react');
const FormattedNumber = require('react-intl').FormattedNumber;

const CappedNumber = props => (
    
        
        {props.value > 100 ? '+' : ''}
    
);

CappedNumber.propTypes = {
    className: PropTypes.string,
    value: PropTypes.number.isRequired
};

CappedNumber.defaultProps = {
    as: 'span'
};
github rsamec / react-pathjs-chart / app.js View on Github external
getInitialState: function getInitialState() {
        var defaultAxis = { showAxis: true, showLines: true, showLabels: true, showTicks: true, zeroAxis: true, orient: 'left' };
        return {
            data: {
                n: 3,
                options: {
                    margin: { top: 20, left: 60, bottom: 50, right: 20 },
                    axisX: _underscore2['default'].extend(_underscore2['default'].clone(defaultAxis), { orient: 'bottom' }),
                    axisY: _underscore2['default'].extend(defaultAxis, {
                        labelComponent: _react2['default'].createElement(_reactIntl.FormattedNumber, { value: 1000, style: 'currency', currency: 'USD' })
                    })
                },
                barOptions: {
                    margin: { top: 20, left: 20, bottom: 50, right: 20 },
                    axisY: { showAxis: true, showLines: true, showTicks: true, showLabels: true },
                    axisX: { showAxis: true, showLines: true, showTicks: true, showLabels: true }
                }
            }
        };
    },
    render: function render() {