0.1.14 • Published 6 years ago

react-seat-charts v0.1.14

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

React Seat Charts

React Seat Charts is a library powered by React to create interactive seat selectors.

Example

Installation

To install, use npm:

$ npm install react-seat-charts

Usage

Import and render a SeatingChart component:

import React from "react";
import { SeatingChart } from 'react-seat-charts';

export default class App extends React.Component {
  render() {
  	// SeatingChart requires a double nested array of seat objects
	let seats = [ [{seatType: "regular", status: "available", label: "5"}],
				  [{seatType: "spacer"}] ];
	
	// Naming is optional
	let naming = { rows: ["A"], columns: ["1"]};
    
    // Let there be seats
    let seatingChart = <SeatingChart seats={seats} naming={naming}/>;
    return <div>{seatingChart}</div>;
  }
}

This renders to:

<div>
	<div class="seatChart-container">
		<div class="seatChart-row">
			<div class="seatChart-cell">
				<div class="seatChart-seat regular available">5</div>
			</div>
		</div>
		<div class="seatChart-row">
			<div class="seatChart-cell seatChart-spacer"></div>
		</div>
	</div>
</div>

See the Wiki for more information about the components included.

0.1.14

6 years ago

0.1.13

6 years ago

0.1.12

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago