This project is a simple React application that creates a dynamic grid (table) where users can:
- Specify the number of rows and columns.
- Click a button to update the grid dimensions.
- Click on a cell to highlight the area from (1, 1) to the clicked cell (including the cell itself) in blue.
- See the selected cell's coordinates and the total number of selected cells.
- React
- CSS
-
Clone the repository:
git clone [https://github.com/BillECU/Dynamic-Grid.git](https://github.com/BillECU/Dynamic-Grid.git) cd Dynamic-Grid
-
Install dependencies:
npm install
-
Start the development server:
npm start
This will start the React development server, and the application will be accessible in your browser (usually at
http://localhost:3000
).
- Grid Controls: Use the input fields to specify the desired number of rows and columns for the grid.
- Update Grid: Click the "Update Grid" button to redraw the grid with the new dimensions.
- Cell Selection: Click on any cell in the grid. This will highlight the area from (1, 1) to the clicked cell (including the cell itself) in blue.
- Information Display: Below the grid:
- The "Selected coordinate" shows the row and column number of the initially clicked cell.
- The "Total cells selected" displays the total number of cells currently highlighted in blue.
If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes.
- Submit a pull request.
MIT License