1.0.14 • Published 4 years ago

alm-search-01 v1.0.14

Weekly downloads
43
License
-
Repository
-
Last release
4 years ago

This project was bootstrapped with Create React App.

clone the Repo from the master branch to get the latest Code

Available Scripts

In the project directory, you can run:

npm install

To install all the dependencies

npm start

Runs the app in the development mode. Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits. You will also see any lint errors in the console.

npm build

Builds the app for production to the dist folder. It correctly bundles React in production mode and optimizes the build for the best performance.

To Publish the Package

npm login

Enter the username and password to login in NPM account

Then, update the version in the package.json file

Run npm run publish:npm command to create the dist folder with the updated code

Run npm publish command to publish the package in your NPM account

How to use the Package

Now you can import the Hotels and Flights component from alm-search-01/dist/Hotels and alm-search-01/dist/Flights respectively.

Default props for the Flights widget that you can pass at the time of calling the widget:- isMobile, lang, departureDate, returnDate, destination, destinationIata, origin originIata, defaultAdult, defaultChild, defaultInfants.

Default props for the Hotels widget that you can pass at the time of calling the widget:- lang, isMobile, hotelsSearchQueryApiUrl, hotelsSearchQueryApiOptions, checkInDate, checkOutDate, place, rooms, renderLocationDropdownItem.

If you are using SCSS in your project then add the styles.scss file in the your project scss file to load the styling. If you are using CSS in your project then add the styles.css file in your project to load the styling.

If your are passing the dates as props to overwrite the default dates then to Show the date in arabic when you land on the page, you have to import the dateLanguage js in utils folder in your file and call the dateLanguageSwitcher function.