[![NPM version][npm-image]][npm-url] [![Build][github-build]][github-build-url] ![npm-typescript] [![License][github-license]][github-license-url]
npm install different-roads-booking-form[![NPM version][npm-image]][npm-url]
[![Build][github-build]][github-build-url]
![npm-typescript]
[![License][github-license]][github-license-url]
You can clone it and step by step create your own NPM package and publish it.
Reusable form for different roads.
``bash`
npm install different-roads-booking-form --save-dev
or
`bash`
yarn add -D different-roads-booking-form
Add PassangerForm to your component:
`js
import React from 'react'
import ReactDOM from 'react-dom/client'
import { PassangerForm, Summary, BookingFlight } from 'different-roads-booking-form'
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement)
root.render(
room={room}
roomIndex={key}
key={'room-settting-' + key}
updateTraveler={updateTravelerReservationsFields}
reservationFields={reservationFields}
travelers={state.travelers}
submitExecute={submitExecute}
setSubmitExecute={setSubmitExecute}
/>
travelers={transformTravelers(node_travelerproduct)}
node_deadline={orderNodeDeadline(node_deadline)}
node_payment={node_payment}
/>
period={state.flight?.period as Period}
/>
)
``
[npm-url]: https://www.npmjs.com/package/different-roads-booking-form
[npm-image]: https://img.shields.io/npm/v/different-roads-booking-form
[github-license]: https://img.shields.io/github/license/Different-Roads/different-roads-booking-form
[github-license-url]: https://github.com/Different-Roads/different-roads-booking-form/blob/master/LICENSE
[github-build]: https://github.com/Different-Roads/different-roads-booking-form/actions/workflows/publish.yml/badge.svg
[github-build-url]: https://github.com/Different-Roads/different-roads-booking-form/actions/workflows/publish.yml
[npm-typescript]: https://img.shields.io/npm/types/different-roads-booking-form