react-room-occupancy-input
v3.1.0
Published
React.js component for specifying a hotel room occupancy: how many adults, how many kids, how old kids are
Downloads
63
Maintainers
Readme
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');
}