New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mindinventory/react-native-bus-seat-layout

Package Overview
Dependencies
Maintainers
7
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mindinventory/react-native-bus-seat-layout

Booking Ticket

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
7
Created
Source

@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.

Installation

using npm:

npm install @mindinventory/react-native-bus-seat-layout

using yarn:

yarn add @mindinventory/react-native-bus-seat-layout

Preview

Simulator Screen Recording - iPhone 11 - 2022-11-08 at 18 39 33 Simulator Screen Recording - iPhone 11 - 2022-11-08 at 18 40 42

Supported platform

  • Android
  • Ios

Usage

import SeatsLayout from "@mindinventory/react-native-bus-seat-layout";

<SeatsLayout
    row={14}
    layout={{ columnOne: 3, columnTwo: 2 }}
    selectedSeats={[
        { seatNumber: 1, seatType: 'booked' },
        { seatNumber: 11, seatType: 'women' },
        { seatNumber: 17, seatType: 'women' },
        { seatNumber: 43, seatType: 'blocked' },
    ]}
    numberTextStyle={{ fontSize: 12 }}
    seatImage={{ image: SleeperSeatIcon, tintColor: '#B2B2B2' }}
    getBookedSeats={(seats) => {
        console.log('getBookedSeats :: ', seats);
    }}
/>

Props to use

ParameterTypeDescription
rownumberSet number of rows to draw seat layout.
layoutLayout (Optional)Default value columnOne: 2 & columnTwo: 2.
driverPositionstring (Optional)Accepts string args among left or right. Default is right.
isSleeperLayoutboolean (Optional)Accepts boolean value either true or false. Default is false.
maxSeatToSelectnumber (Optional)Allow uset to select maximum number of seats to book in one go. Default value 7.
selectedSeatsArray (Optional)Accepts value seatNumber number and seatType number which accepts value from (booked or women or blocked). Default its set to blank array.

Contributing!

See the contributing guide to learn how to contribute to the repository and the development workflow.

License!

@mindinventory/react-native-bus-seat-layout MIT-licensed.

Let us know!

If you use our open-source libraries in your project, please make sure to credit us and Give a star to www.mindinventory.com

Please feel free to use this component and Let us know if you are interested to building Apps or Designing Products.
app development

Keywords

FAQs

Package last updated on 08 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc