react-native-book-a-flight
v1.0.1
Published
React Native plugin for booking flights
Downloads
113
Maintainers
Readme
React Native Book A Flight
A React Native component for integrating flight booking functionality into your mobile app.
Installation
npm install @alvinapp/react-native-book-a-flight
# or
yarn add @alvinapp/react-native-book-a-flight
Usage
import { BookFlight } from '@alvinapp/react-native-book-a-flight';
export default function App() {
const handleBookingComplete = (bookingDetails) => {
console.log('Booking completed:', bookingDetails);
};
return (
<BookFlight
publicKey="your_public_key_here"
onBookingComplete={handleBookingComplete}
/>
);
}
Props
publicKey
(string): Your API public keyidentifier
(string, optional): Custom identifiertoken
(string, optional): Authentication tokenstyleUrl
(string, optional): URL for custom stylessettings
(string, optional): Custom settingsuuid
(string, optional): Unique identifieruserObject
(object, optional): User informationfirst_name
(string, optional)last_name
(string, optional)email
(string, optional)
onBookingComplete
(function, optional): Callback when booking is completedstyle
(object, optional): Custom styles for the container
License
MIT