made components that create and edit item can share, started item detail changes, listings provide more views

This commit is contained in:
jackiettran
2025-08-20 17:06:47 -04:00
parent ddd27a59f9
commit b624841350
13 changed files with 1008 additions and 982 deletions

View File

@@ -0,0 +1,53 @@
import React from "react";
interface ItemInformationProps {
name: string;
description: string;
onChange: (
e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>
) => void;
}
const ItemInformation: React.FC<ItemInformationProps> = ({
name,
description,
onChange,
}) => {
return (
<div className="card mb-4">
<div className="card-body">
<div className="mb-3">
<label htmlFor="name" className="form-label">
Item Name *
</label>
<input
type="text"
className="form-control"
id="name"
name="name"
value={name}
onChange={onChange}
required
/>
</div>
<div className="mb-3">
<label htmlFor="description" className="form-label">
Description *
</label>
<textarea
className="form-control"
id="description"
name="description"
rows={4}
value={description}
onChange={onChange}
required
/>
</div>
</div>
</div>
);
};
export default ItemInformation;