forked from MAVRICK-1/e-commerce_website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request MAVRICK-1#14 from Animesh239/feat-prod-form
added add product form
- Loading branch information
Showing
2 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
); | ||
} |