react-room-occupancy-input

3.1.0 • Public • Published

Build Status

About

React.js component for specifying a hotel room occupancy: how many adults, how many kids, how old kids are. See the demo.

Installation

Made for Browserify.

npm install --save react-room-occupancy-input

Usage

See the code of the demo mentioned above.

Internationalization

react-intl-based. To translate the component, please pass the messages property, having the following format:

{
    'react-room-occupancy-input': {
        children: 'Children',
        childrenAge: '{children, plural, =1 {Child age} other {Children ages}}',
        adults: 'Adults'
    }
}

react-intl allows using react-room-occupancy-input uniformly in bigger applications, and passing all the namespaced translations, from the root, down the React components hierarchy, -- automatically, with the help of IntlMixin.

Please note, that react-intl depends on global Intl object. You can polyfill it with intl package:

if (!global.Intl) {
    require('intl');
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.1.0
    3
    • latest

Version History

Package Sidebar

Install

npm i react-room-occupancy-input

Weekly Downloads

3

Version

3.1.0

License

MIT

Unpacked Size

57.3 kB

Total Files

30

Last publish

Collaborators

  • ikr