Mindinventory / react-native-bus-seat-layout

A @mindinventory/react-native-bus-seat-layout library provides seats layout for bus booking, you can give custom styles of seat numbers. also can give images for seat. you have to provide number of rows that you need to draw layout, you will get selected seats from props.
https://www.mindinventory.com/react-native-app-development.php
MIT License
22 stars 6 forks source link

Feature : door_in_exit_door #16

Closed harshinventory closed 1 month ago

harshinventory commented 1 month ago

Detail: added in-exit door functionality.

Build Test:

Attached Screenshot

Simulator Screenshot - iPhone 16 - 2024-09-23 at 11 16 36

Simulator Screenshot - iPhone 16 - 2024-09-23 at 11 16 40

Test Case:

harshinventory commented 1 month ago

Updated Component Usage:

<SeatsLayout
  row={10}
  layout={{ columnOne: 2, columnTwo: 2 }}
  isSleeperLayout={true}
  seatImage={{ image: SleeperSeatIcon, tintColor: 'gray' }}
  selectedSeats={[
    { seatNumber: 1, seatType: 'booked' }, // Booked seat
    { seatNumber: 2, seatType: 'blocked' }, // Blocked Seat data
    { seatNumber: 5, seatType: 'door' }, // Show Door
    { seatNumber: 6, seatType: 'emptySpace' }, // Empty space
    { seatNumber: 11, seatType: 'women' },
    { seatNumber: 12, seatType: 'women' }, // Women seat
    { seatNumber: 16, seatType: 'booked' },
    { seatNumber: 17, seatType: 'door' }, // Show Door
    { seatNumber: 18, seatType: 'emptySpace' }, // Empty space
    { seatNumber: 29, seatType: 'door' }, // Show Door
    { seatNumber: 30, seatType: 'emptySpace' },
  ]}
  numberTextStyle={styles.numberStyle}
  getBookedSeats={(seats) => {
    console.log('getBookedSeats :: ', seats);
  }}
/>