Skip to content

Commit

Permalink
added ids to add component inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
marwanehab98 committed Jan 2, 2023
1 parent a051835 commit 5f3dce9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions src/components/CreateProduct/CreateProduct.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ function CreateProduct() {
}}
/>
</Form.Group>
<Form.Group className="mb-3" controlId="#name">
<Form.Group className="mb-3">
<Form.Label>Name</Form.Label>
<Form.Control
// id='#name'
id='name'
required
className="productDataEntry"
placeholder="Enter Product Name"
Expand All @@ -150,10 +150,10 @@ function CreateProduct() {
}}
/>
</Form.Group>
<Form.Group className="mb-3" controlId="#price">
<Form.Group className="mb-3">
<Form.Label>Price ($)</Form.Label>
<Form.Control
// id='#price'
id='price'
required
// type='number'
// step={0.01}
Expand All @@ -167,9 +167,9 @@ function CreateProduct() {
}}
/>
</Form.Group>
<Form.Group className="mb-3" controlId='#productType'>
<Form.Group className="mb-3">
<Form.Label>Type Swithcer</Form.Label>
<Form.Select onChange={(e) => handleTypeChange(e)}>
<Form.Select id='productType' onChange={(e) => handleTypeChange(e)}>
<option>Book</option>
<option>DVD</option>
<option>Furniture</option>
Expand Down
4 changes: 2 additions & 2 deletions src/components/CreateProduct/TypeComponents/BookComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { Form } from 'react-bootstrap';

function BookComponent(props) {
return (
<Form.Group className="mb-3" controlId="#weight">
<Form.Group className="mb-3">
<Form.Label>Weight (KG)</Form.Label>
<Form.Control
// id='#weight'
id='weight'
required
// type='number'
// step={0.01}
Expand Down
4 changes: 2 additions & 2 deletions src/components/CreateProduct/TypeComponents/DVDComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { Form } from 'react-bootstrap';

function DVDComponent(props) {
return (
<Form.Group className="mb-3" controlId="#size">
<Form.Group className="mb-3">
<Form.Label>Size (MB)</Form.Label>
<Form.Control
// id='#size'
id='size'
required
// type='number'
// step={0.01}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { Form } from 'react-bootstrap';
function FurnitureComponent(props) {
return (
<>
<Form.Group className="mb-3" controlId="#length">
<Form.Group className="mb-3">
<Form.Label>Length (CM)</Form.Label>
<Form.Control
// id='#length'
id='length'
required
// type='number'
// step={0.01}
Expand All @@ -18,10 +18,10 @@ function FurnitureComponent(props) {
}}
/>
</Form.Group>
<Form.Group className="mb-3" controlId="#width">
<Form.Group className="mb-3">
<Form.Label>Width (CM)</Form.Label>
<Form.Control
// id='#width'
id='width'
required
// type='number'
// step={0.01}
Expand All @@ -32,10 +32,10 @@ function FurnitureComponent(props) {
}}
/>
</Form.Group>
<Form.Group className="mb-3" controlId="#height">
<Form.Group className="mb-3">
<Form.Label>Height (CM)</Form.Label>
<Form.Control
// id='#height'
id='height'
required
// type='number'
// step={0.01}
Expand Down

2 comments on commit 5f3dce9

@vercel
Copy link

@vercel vercel bot commented on 5f3dce9 Jan 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 5f3dce9 Jan 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.