Skip to content

Commit

Permalink
Merge pull request MAVRICK-1#14 from Animesh239/feat-prod-form
Browse files Browse the repository at this point in the history
added add product form
  • Loading branch information
MAVRICK-1 authored Feb 4, 2024
2 parents 1e5a404 + 2a9da1d commit 40f2ac4
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import Cart from './pages/cart';
import SignIn from './pages/SignIn';
import SignUp from './pages/SignUp';
import Loader from './assets/images/loading.gif';
// import AddProductForm from './pages/AddProd';

import data from './data';

Expand Down Expand Up @@ -159,6 +160,7 @@ function App() {
<Route exact={true} path="/cart" element={<Cart />} />
<Route exact={true} path="/signIn" element={<SignIn />} />
<Route exact={true} path="/signUp" element={<SignUp />} />
{/* <Route exact={true} path="/addProduct" element={<AddProductForm />} /> */}
<Route exact={true} path="*" element={<NotFound />} />
</Routes>
<Footer/>
Expand Down
105 changes: 105 additions & 0 deletions src/pages/AddProd/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
import React from "react";
import { Typography, Container, Grid, TextField, Button } from "@mui/material";

export default function AddProductForm() {
return (
<Container maxWidth="md" sx={{ padding: 4 }}>
<Typography variant="h4" fontWeight="bold" gutterBottom>
Add Product
</Typography>
<Typography variant="body2" color="text.secondary" gutterBottom>
Fill out the form below to add a product to our store.
</Typography>
<Grid container spacing={4}>
<Grid item xs={12} md={6}>
<TextField
id="product-name"
label="Product Name"
fullWidth
placeholder="Enter product name"
color="success"
/>
</Grid>
<Grid item xs={12} md={6}>
<TextField
id="filled-number"
label="Price"
fullWidth
placeholder="Enter original price"
type="number"
variant="filled"
color="success"
/>
</Grid>
<Grid item xs={12} md={6}>
<TextField
id="filled-number"
label="Discount Price"
fullWidth
placeholder="Enter discount price"
type="number"
variant="filled"
color="success"
/>
</Grid>
<Grid item xs={12} md={6}>
<TextField
id="filled-number"
label="Weights Available"
fullWidth
placeholder="Enter weights"
type="number"
variant="filled"
color="success"
/>
</Grid>
<Grid item xs={12} md={6}>
<TextField
id="main-image"
InputLabelProps={{ shrink: true }}
label="Main Image"
fullWidth
type="file"
color="success"
/>
</Grid>
<Grid item xs={12} md={6}>
<TextField
id="subsidiary-images"
InputLabelProps={{ shrink: true }}
label="Subsidiary Images"
fullWidth
multiple
type="file"
color="success"
/>
</Grid>
<Grid item xs={12} md={6}>
<TextField
id="brand"
label="Brand"
fullWidth
placeholder="Enter brand"
color="success"
/>
</Grid>
<Grid item xs={12} md={6}>
<TextField
id="quantity"
label="Quantity Available"
fullWidth
placeholder="Enter quantity available"
type="number"
inputProps={{ inputMode: "numeric", pattern: "[0-9]*" }}
color="success"
/>
</Grid>
<Grid item xs={12}>
<Button variant="contained" color="success" fullWidth>
Add Product
</Button>
</Grid>
</Grid>
</Container>
);
}

0 comments on commit 40f2ac4

Please sign in to comment.