React.js component for specifying a hotel room occupancy: how many adults, how many kids, how old kids are
npm install react-room-occupancy-input
React.js component for specifying a hotel room occupancy: how many adults, how many kids, how old
kids are. See the demo.
Made for Browserify.
npm install --save react-room-occupancy-input
react-intl-based. To translate the component, please pass themessages property, having the following format:
``js`
{
'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 passingIntlMixin
all the namespaced translations, from the root, down the React components hierarchy, --
automatically, with the help of .
Please note, that react-intl depends on global Intl object. You can polyfill it with
intl package:
`js``
if (!global.Intl) {
require('intl');
}