1.1.0 • Published 9 months ago

react-dining-tables v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

React Dining Tables

A visually appealing React component to showcase stylish dining tables with interactive chair visualization.

Installation

Easily enhance your React app by installing the react-dining-tables package using npm:

npm install react-dining-tables


Usage

Integrate the ReactTableChair component seamlessly into your React application:

jsx

import React from 'react';
import ReactDOM from 'react-dom';
import ReactTableChair from 'react-dining-tables';
import 'react-dining-tables/styles.css'; // Import the styles

const App = () => {
  const tables = [
    { id: 1, chair: 4, booked: true, details: "Luxury Dining Set" },
    { id: 2, chair: 6, booked: false, details: "Modern Table Design" },
    // ... more tables
  ];

  const handleTableSelect = (tableId) => {
    // Handle table selection logic
    console.log('Table selected:', tableId);
  };

  return (
    <div>
      <h1>Welcome to Our Dining Area</h1>
      <ReactTableChair
        data={tables}
        onTableSelect={handleTableSelect}
        bgColor="#102720"
      />
    </div>
  );
};

ReactDOM.render(<App />, document.getElementById('root'));

<details>
<summary><strong>Expand for Props</strong></summary>

    data (required): An array of objects representing the dining tables with their properties.
    onTableSelect (required): A function to handle table selection.
    bgColor: Background color of the dining area.

</details>
Styling

The react-dining-tables package provides an elegant default styling for the dining tables component. Customize the styles by overriding the provided CSS classes in your project.
1.1.0

9 months ago

1.0.8

9 months ago

1.0.7

9 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago